nmattia / niv

Easy dependency management for Nix projects
https://github.com/nmattia/niv
MIT License
1.55k stars 77 forks source link

Enable building with latest nixpkgs #298

Closed lrworth closed 3 years ago

lrworth commented 3 years ago

The latest nixpkgs sets GHC 8.10 as default, and this version of GHC won't compile Niv due to stricter defaults. This PR bumps nixpkgs to latest master and fixes that compile error.

There were a few other things which needed to be fixed before I could do this:

Resolves #297

lrworth commented 3 years ago

nixpkgs-fmt needs to be pointed at the nix-community/nixpkgs-fmt repo before this can be merged.

lrworth commented 3 years ago

I believe sources.nix was changed automatically by ./script/gen, but I'll run the process again tomorrow to check. (Granted, I also could've done a better job at organising the commits.)

My initial motivation for this change was to get a project building on macOS Big Sur, which is not supported by nixpkgs 20.09, but is supported in the latest nixpkgs master; so I don't think we can pin 20.09 if we want to support the latest macOS.

lrworth commented 3 years ago

I've redone this change based on the latest version of niv, and pinned to nixpkgs-unstable instead of master to get better caching.

lrworth commented 3 years ago

CI is failing for configuration reasons, not because this PR is broken

lrworth commented 3 years ago

No worries @nmattia!

Release 20.09 is unable to complete the linking phase for any package on macOS Big Sur, that's why this PR exists at all. I reckon delay this until 21.03 if you'd prefer to stay on nixpkgs releases.

lrworth commented 3 years ago

https://github.com/NixOS/nixpkgs/pull/105799 will make 20.09 work with Big Sur.

(edit)

Narrator: it did not

nmattia commented 3 years ago

Great, looks like there's still some activity on https://github.com/NixOS/nixpkgs/pull/105799, let's wait for that to go in if you don't mind! I'll check back here next week.

nmattia commented 3 years ago

@lrworth looks like https://github.com/NixOS/nixpkgs/pull/105799 was merged, should we give this another try?

SuperSandro2000 commented 3 years ago

@lrworth looks like NixOS/nixpkgs#105799 was merged, should we give this another try?

It wasn't merged. It was closed because it does not work.

nmattia commented 3 years ago

Ah man got too used to bors closing PRs instead of merging them. My bad.

refnil commented 3 years ago

Am I correct in saying that PR was essentially merged under this commit by @nmattia ? If so, we could close this PR.

lrworth commented 3 years ago

Looks like it 🎈