NixOS / cabal2nix

Generate Nix build instructions from a Cabal file
https://haskell4nix.readthedocs.io
Other
362 stars 156 forks source link

Flake-enable project #587

Open Gabriella439 opened 1 year ago

Gabriella439 commented 1 year ago

The immediate motivation for doing this was that the old shell.nix failed with the nixpkgs channel that I had installed. While I was fixing this to pin nixpkgs I figured this would be a good time to flake-enable the project.

sternenseemann commented 1 year ago

This was proposed before in #533 and I'm inclined to veto it – I do not want to support anyone declaring cabal2nix as a flake input (which seems to be the inevitable consequence). Also the devShell split is less convenient than the current shell, as you need to switch environment depending on what package you are working on.

I also personally don't use flakes, so the sluggishness afforded by flake-compat is not really acceptable.

I'm curious about the eval failure though, since cabal2nix is pretty boring (which is also a reason why having some random channel over a months old pin is not bad).

Gabriella439 commented 1 year ago

If the requirement is that you want the nixpkgs input to remain up-to-date that is totally doable using flakes. I can change the flake input to track Nixpkgs master, nixpkgs-unstable, or whatever branch you want

Gabriella439 commented 1 year ago

Also, just to clarify: the motivation for this flake is for local development, not for depending on cabal2nix as a flake input. If you want to remove the possibility of depending on the cabal2nix flake as a package I can remove the packages outputs from the flake and leave behind just the devShells. I only included the packages outputs for completeness