nmattia / niv

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

niv doesn't build with latest nixpkgs #297

Closed YorikSar closed 3 years ago

YorikSar commented 3 years ago

I'm trying out niv for my repo and when I try to use nix version from sources.nix created by niv init, I'm getting following build failure:

src/Niv/Update.hs:299:3: error: [-Woverlapping-patterns, -Werror=overlapping-patterns]
    Pattern match is redundant
    In a case alternative: _ -> ...
    |
299 |   _ -> Just $ pure T.empty
    |   ^^^^^^^^^^^^^^^^^^^^^^^^

Steps to reproduce:

Note that pkgs.niv works fine, even though it's built with the same compiler and the line in question is present in 0.2.18 tag used there.

zimbatm commented 3 years ago

it's probably related to https://discourse.nixos.org/t/new-ghc-default-version-8-10-2-package-versions-now-from-stackage-nightly/10117

YorikSar commented 3 years ago

Yes, but it works fine in Nixpkgs, that's why I'm surprised it doesn't work directly like this.

nmattia commented 3 years ago

Hi! Thanks for reporting. Just came back from holidays, I'm hoping #298 will fix the issue, though looks like there might be a few hurdles.

YorikSar commented 3 years ago

@nmattia Wow, that's a huge diff. That's for looking into this.

nmattia commented 3 years ago

Please thank @lrworth instead!