by rnhmjoj · 10y ago · 0 comments
My current approach is: write the usual .cabal file, run
cabal2nix --shell . > default.nix
then build and install the package (with `nix-build` or `nix-env -if.`) or open a nix-shell (just `nix-shell` in the project root) where I can run cabal-install to do things like uploading to hackage, building haddock docs, using cabal repl.The nix expression is deterministically generated by the .cabal so unless you update the nix channel it won't change and you can safely delete it and regenerate it at anytime. While stack.yaml is not, or not entirely generate, if I understand correctly.
Are there other advantages over cabal2nix beside parallelization and incremental recompilation? I hardly handle 2 package at once so it's not really an issue for me.