[Nix-dev] nix-repl / nix-build inconsistency in haskell development

Peter Simons simons at cryp.to
Sat Oct 25 16:01:55 CEST 2014


Hi Athan,

am I guessing correctly that your system follows the release-14.04
branch? If that is the case, then you should probably add the argument

 -I nixpkgs=/opt/nixpkgs

to the "nix-build" command-line to fix the build.

The master branch contains code that allows it to build Haskell projects
that contain no Setup.hs file [1], but patch code was never merged to
release-14.04. (Not sure whether it should have been.)

"nix-build default.nix" uses the system-wide nixpkgs repository (a.k.a.
'<nixpkgs>'). Your call to nix-repl, however, loads another repository,
which I suspect follows the master branch.

I hope this helps,
Peter


[1] https://github.com/NixOS/nixpkgs/commit/dc285e6895e97355f769fdd6341b3e9c0cce2cf9



More information about the nix-dev mailing list