cabal2nix icon indicating copy to clipboard operation
cabal2nix copied to clipboard

The attribute "type" has special meaning in Nix

Open peti opened this issue 9 years ago • 3 comments

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.

peti avatar Apr 16 '15 10:04 peti

https://github.com/NixOS/nix/blob/1.8/src/libexpr/eval.cc#L1286-L1294

shlevy avatar Apr 16 '15 10:04 shlevy

Couldn't it use "type" as the attribute name? { "type" = ... }

3noch avatar Oct 28 '16 23:10 3noch

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.

peti avatar Dec 18 '16 12:12 peti