[Nix-dev] Changes in cabal2nix version 20150525

Peter Simons simons at cryp.to
Tue May 26 10:57:08 CEST 2015


Hi folks,

I'd like to point out that cabal2nix version 20150525 -- which was added
in revision d808f5b3e669 -- brings three important changes you might want
to know about:

 1) Output generated by "cabal2nix --shell" now works for both nix-shell
    and nix-build. In other words, you can execute

      $ nix-build shell.nix

    to build your Haskell project with Nix. If that build fails with
    strange compiler errors, then clear out the "dist/" directory [1].

 2) The generated "shell.nix" expression accepts an argument called
    "compiler" that chooses the GHC version to use for the build. For
    example:

      $ nix-shell --argstr compiler ghc784
      $ nix-build shell.nix --argstr compiler ghc763

    The default compiler is "ghc7101". To see the list of available
    compilers, run:

      $ nix-env -f "<nixpkgs>" -qaP -A haskell.compiler

  3) Files generated by cabal2nix no longer refer to "haskellngPackages".
     That name is still valid, but it's obsolete now that Haskell NG has
     replaced the old infrastructure [2].

Best regards,
Peter



[1] https://github.com/NixOS/cabal2nix/issues/112
[2] https://github.com/NixOS/nixpkgs/blob/c0c82ea2ebbcf0632260a931cf832cac1c8a014e/pkgs/top-level/all-packages.nix#L14429-14430



More information about the nix-dev mailing list