mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
* nix-pack-closure: store the top-level store paths in the closure.
* nix-unpack-closure: extract the top-level paths from the closure and print them on stdout. This allows them to be installed, e.g., "nix-env -i $(nix-unpack-closure)". (NIX-64)
This commit is contained in:
parent
f25f900045
commit
afe23b5f38
5 changed files with 39 additions and 1 deletions
|
@ -77,3 +77,12 @@ closedir(DIR) or die;
|
|||
# Register the invalid paths as valid.
|
||||
system("nix-store --register-validity <'$tmpDir/validity'") == 0
|
||||
or die "nix-store --register-validity failed";
|
||||
|
||||
|
||||
# Show the top-level paths so that something useful can be done with
|
||||
# them, e.g., passing them to `nix-env -i'.
|
||||
if (-e "$tmpDir/unpacked/top-level") {
|
||||
open TOPLEVEL, "<$tmpDir/unpacked/top-level" or die;
|
||||
while (<TOPLEVEL>) { print "$_"; }
|
||||
close TOPLEVEL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue