haskell-nix icon indicating copy to clipboard operation
haskell-nix copied to clipboard

Rename `default.nix` to `<project>.nix`

Open sgraf812 opened this issue 6 years ago • 3 comments

As I'm trying to make sense of Nix, I was slightly confused that I couldn't just nix-build the default.nix. https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure suggests another approach, where the generated nix expression is instead saved as <project>.nix and then called from default.nix and probably release*.nix by extension.

sgraf812 avatar Apr 05 '18 15:04 sgraf812

Yeah, I'd accept a pull request to organize it that way

Gabriella439 avatar Apr 07 '18 02:04 Gabriella439

In this scenario would default.nix and release*.nix be the same thing?

trevorriles avatar Apr 11 '18 19:04 trevorriles

Depends on whether you want to pin to some nixpks commit, so generally no. https://nixos.org/nixpkgs/manual/#how-to-create-nix-builds-for-your-own-private-haskell-packages gives examples for the most basic shell.nix and default.nix files. release*.nix is just a variant of default.nix that pins dependencies to be reproducible.

sgraf812 avatar Apr 11 '18 19:04 sgraf812