Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative nix #383

Closed
wants to merge 6 commits into from
Closed

Alternative nix #383

wants to merge 6 commits into from

Conversation

ajmcmiddlin
Copy link

While I was working on #380 I (with the help of some team mates) updated the nix setup. @IvanMalison updated the nix setup before I cleaned up my changes and put them in a PR. I thought I should still raise this version, as it takes a different approach that may be preferable.

The key difference here is that nixpkgs is (by default) pinned to a specific commit, such that this setup should always work regardless of the user's NIX_PATH (where <nixpkgs> comes from).

I've tested this with both nix-build and nix-shell --run "cabal v2-build github".

Suffers infinite recursion due to the QuickCheck override.
The cabal.project file has constraints on hashable and semigroups that mean we
need newer versions when doing `cabal v2-*` builds. This commit adds those
constraints, as well as a flag to disable them when not using `cabal v2-*`.
This is already being done for `aeson-1.4.3.0` and saves us bumping the aeson
version in our nix.
@colonelpanic8
Copy link
Contributor

@ajmcmiddlin We could easily pin with the setup that I uploaded by pinning in default.nix. I actually deliberately decided NOT to pin (in the overlay would be fine to pin in default.nix) because this is a library that is presumably used by many different people, who might want to pin to different versions of nixpkgs themselves.

The overlay is generally useful enough that I think people will be able to use it with somewhat different versions of nixpkgs, and it automatically plugs in nicely with existing nix setups.

@ajmcmiddlin
Copy link
Author

Yeah, that all makes sense. I'll use your setup and maybe raise a PR for taking nixpkgs as an argument in default.nix, defaulting it to a pinned version. I think I'll need that in my current project.

@ajmcmiddlin ajmcmiddlin closed this Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants