cabal2nix
cabal2nix copied to clipboard
The attribute "type" has special meaning in Nix
Hackage contains a package called type
. We cannot easily generate an attribute for that package, however, because type
has a special meaning for Nix and it will be evaluated eagerly on some occasions (i.e. when the package set is traversed). I don't fully understand the details yet. For the time being, no expression is generated for type
.
https://github.com/NixOS/nix/blob/1.8/src/libexpr/eval.cc#L1286-L1294
Couldn't it use "type"
as the attribute name? { "type" = ... }
Related to https://github.com/NixOS/cabal2nix/issues/164. Both issues come down to the question of how to represent names that are not valid identifiers in Nix. type
is slightly different, because it's a valid identifier, but it has a special meaning for Nix which means we cannot use the attribute, really.