-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
make-{iso9660-image,squashfs,system-tarball}: drop references to build closure #425700
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
Conversation
I believe this would require bumping the minimum supported Nix version to 2.18, when unsafeDiscardReferences was stabilised. |
|
That may be fine because it's a new feature. make-iso9660-image and friends are more critical pieces of infrastructure, so I think they should support the minimum required Nix version. See also #398444. Pinging @Mic92 @infinisil |
Afaik the presents of this attribute doesn't prevent nix 2.3 from building these images - it might not able to substitute from nixos.org but I think that's an acceptable breakage because the substitution of still maintained nix versions will be vastly improved. Regarding the version bump, I don't know if requiring a certain nix version is meaningful at all anymore with the presents of forks. We might rather need feature checks... but I think this discussion shouldn't be done here and is out of scope for this pull request. |
We should make sure that's true before merging this then: can Nix 2.3 (without the |
We have bumped minver to 2.18, so this should not be blocking anymore. |
This PR sets
unsafeDiscardReferences.out = true;
onmake-iso9660-image
,make-squashfs
andmake-system-tarball
which means that the outputs don't depend on the build closure as they are all self-contained.I've tested this PR works for
make-iso9660-image
by running:Prior to this PR,
nix copy
would copy the entire build closure, however after this PR,nix copy
only copies the final store path.To test
make-system-tarball
, I used the attribute pathsystem.build.images.kexec
instead.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.