|
|
|
|
|
by buttproblem
3963 days ago
|
|
I was just trying to get Nix working after needing a version of base (GHC) newer than what I had installed. The situation seems to have gotten a bit simpler with newer versions of the nix tools (this is of no fault of the author of this post, the post is more than a year old, their blog has great haskell stuff!). Anyway, for haskell development you can just: 1. Write cabal file (e.g., ./project.cabal)
2. cabal2nix --shell . >shell.nix
3. nix-shell
After step 3, all the required packages, including stuff like GHC, will be installed. You can use cabal however you normally do to build the project: 4. cabal sandbox init
5. cabal build
|
|
Also their user manual[0] is really good now.
[0]https://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/down...