-
Notifications
You must be signed in to change notification settings - Fork 42
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
partitions: incompatible with flakes as inputs that use flake-parts #252
Comments
Forgot to mention: You can find the work I'm doing at this rev: boinkor-net/tsnsrv@005e377 |
It only provides a very minor benefit and can easily be replaced with a manual approach. That should address hercules-ci/flake-parts#252.
I have fixed the immediate issue by eliminating all flake utility libraries from generate-go-sri's inputs (using |
I've tried this, but it works:
It also works for Nix 2.18.6, but not in Nix 2.13. |
Hm, so I can't replicate this. Made the following branch :; nix run github:nixos/nix/2.18.6 -- flake show
git+file:///Users/asf/Hacks/tsnsrv?ref=refs/heads/fp-bug-report&rev=005e3771e8bd62867153fcfea43ce563c2c11d66
error:
… while calling the 'head' builtin
at /nix/store/fkjds639pw6ykj3zib7cp4y9i9h6ka9w-source/attrsets.nix:1575:11:
1574| || pred here (elemAt values 1) (head values) then
1575| head values
| ^
1576| else
… while evaluating the attribute 'value'
at /nix/store/fkjds639pw6ykj3zib7cp4y9i9h6ka9w-source/modules.nix:821:9:
820| in warnDeprecation opt //
821| { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
822| inherit (res.defsFinal') highestPrio;
(stack trace truncated; use '--show-trace' to show the full trace)
error: access to absolute path '/nix/store/8ql43f4sxqh1dbpqy2q5jz11zdwf9832-source' is forbidden in pure eval mode (use '--impure' to override) Same with nix 2.24.6: :; nix run github:nixos/nix/2.24.6 -- flake show
warning: unknown experimental feature 'repl-flake'
git+file:///Users/asf/Hacks/tsnsrv?ref=refs/heads/fp-bug-report&rev=005e3771e8bd62867153fcfea43ce563c2c11d66
error:
… while calling the 'head' builtin
at /nix/store/fkjds639pw6ykj3zib7cp4y9i9h6ka9w-source/attrsets.nix:1575:11:
1574| || pred here (elemAt values 1) (head values) then
1575| head values
| ^
1576| else
… while evaluating the attribute 'value'
at /nix/store/fkjds639pw6ykj3zib7cp4y9i9h6ka9w-source/modules.nix:821:9:
820| in warnDeprecation opt //
821| { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
822| inherit (res.defsFinal') highestPrio;
… while evaluating the option `flake.apps':
… while evaluating the option `partitions.dev.module':
… while evaluating definitions from `/nix/store/vmxpp69qfl29zis707vl6pi97b6x6wg6-source/extras/partitions.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: access to absolute path '/nix/store/8ql43f4sxqh1dbpqy2q5jz11zdwf9832-source' is forbidden in pure evaluation mode (use '--impure' to override) ...and the same with my system nix, |
I'm currently porting https://github.com/boinkor-net/tsnsrv/'s flake over to using partitions, so my downstream users don't have to endure my dev dependencies. Unfortunately, one of my dev dependencies is https://github.com/antifuchs/generate-go-sri, which itself uses flake-parts. When that is an input on my dev flake and I put
inputs.generate-go-sri.flakeModules.default
on the dev flake module's imports, I get the following error:Where that "absolute" store path is flake-parts' locked revision in generate-go-sri. Does that mean it's only possible to use flakes that don't themselves use flake-parts as deps in partitions, or is there another way?
Things I tried
Set
inputs.flake-parts.follows = "";
on the dev flake's generate-go-sri input:That results in a flake that loads, but then the
apps
anddevShells
attrsets fail to evaluate:Comment out all usages of generate-go-sri
That works, but prevents me from generating the SRI hash for the go package, which isn't a great development experience.
The text was updated successfully, but these errors were encountered: