Map Cabal names to Nix identifiers that don't need to be quoted.
Currently this only supports PackageNames that consist of nothing but ASCII characters (as needs to be the case with all Hackage packages). Cabal package names are not changed if they already are a Nix identifier that doesn't need quoting (with some notable exceptions). If they would need quoting, they are prefixed with an underscore.
toNixName $ mkPackageName "cabal2nix"Identifier "cabal2nix"toNixName $ mkPackageName "4Blocks"Identifier "_4Blocks"toNixName $ mkPackageName "assert"Identifier "_assert"
Package names that clash with attribute names that have a special meaning
to the Nix evaluator are also prefixed (e.g.
type is evaluated eagerly).
The mapping is intended to be reversible, but this isn't implemented by
cabal2nix yet (and untested). It also should not be considered
stable yet, in particular the following may be changed:
Future versions of
cabal2nixmay prefix more PackageNames.The mapping may be extended to support all possible PackageNames.
See also: