-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Generated Nix expression references out-of-scope pkgs
#40
Comments
Ah, it's actually added by So I think this is indeed an upstream issue after all. |
@isomorpheme Thanks for looking into this. I sent a PR to cabal2nix that should somewhat fix this: NixOS/cabal2nix#611. This problem will require a separate fix in stacklock2nix as well. |
That was fast, thank you! |
This has made its way to Nixpkgs: NixOS/nixpkgs@0c2ff42 But we still need this same fix in stacklock2nix, I think. |
Minimal repro here:
https://gist.github.com/isomorpheme/514b826ca0f9bf2ee28aa5ca27863d8b
Running
nix build
on that flake will produce an error likeThe top-level trigger is the dependency on
tz
; commenting it inmy-example-haskell-lib
makes the build succeed.The custom
preConfigure
seems to come from here, but if so I have no idea how the${pkgs.tzdata}
bit wasn't interpolated already. Inhackage-packages.nix
it also shows up, but there it's fine becausepkgs
is bound at the top of the file. The generateddefault.nix
that triggers the error doesn't have this structure.I've tried using
cabal2NixArgsOverrides
as a workaround, but it doesn't seem to work (I might've been using it wrong, though).This may be an upstream issue with
cabal2nix
, but I couldn't tell for sure, so I'm starting here.The text was updated successfully, but these errors were encountered: