mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
* Put a nix-pull manifest of the Nix store on the CD.
svn path=/nixos/trunk/; revision=7777
This commit is contained in:
parent
d883483a0e
commit
995b749f70
@ -26,6 +26,10 @@ for i in $storePaths; do
|
||||
done
|
||||
|
||||
|
||||
# Also put a nix-pull manifest of the closures on the CD.
|
||||
printManifest=1 perl $pathsFromGraph closure-* > MANIFEST
|
||||
|
||||
|
||||
# Add symlinks to the top-level store objects.
|
||||
for ((n = 0; n < ${#objects[*]}; n++)); do
|
||||
object=${objects[$n]}
|
||||
|
@ -1,6 +1,7 @@
|
||||
use strict;
|
||||
|
||||
my %storePaths;
|
||||
my %refs;
|
||||
|
||||
foreach my $graph (@ARGV) {
|
||||
open GRAPH, "<$graph" or die;
|
||||
@ -13,14 +14,39 @@ foreach my $graph (@ARGV) {
|
||||
my $deriver = <GRAPH>; chomp $deriver;
|
||||
my $count = <GRAPH>; chomp $count;
|
||||
|
||||
my @refs = ();
|
||||
for (my $i = 0; $i < $count; ++$i) {
|
||||
my $ref = <GRAPH>;
|
||||
my $ref = <GRAPH>; chomp $ref;
|
||||
push @refs, $ref;
|
||||
}
|
||||
$refs{$storePath} = \@refs;
|
||||
|
||||
}
|
||||
|
||||
close GRAPH;
|
||||
}
|
||||
|
||||
foreach my $storePath (sort (keys %storePaths)) {
|
||||
print "$storePath\n";
|
||||
|
||||
if ($ENV{"printManifest"} eq "1") {
|
||||
print "version {\n";
|
||||
print " ManifestVersion: 3\n";
|
||||
print "}\n";
|
||||
|
||||
foreach my $storePath (sort (keys %storePaths)) {
|
||||
print "{\n";
|
||||
print " StorePath: $storePath\n";
|
||||
print " CopyFrom: /tmp/inst-store$storePath\n";
|
||||
print " References: ";
|
||||
foreach my $ref (@{$refs{$storePath}}) {
|
||||
print "$ref ";
|
||||
}
|
||||
print "\n";
|
||||
print "}\n";
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
foreach my $storePath (sort (keys %storePaths)) {
|
||||
print "$storePath\n";
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ rec {
|
||||
|
||||
# The installer.
|
||||
nixosInstaller = import ../installer/nixos-installer.nix {
|
||||
inherit (pkgs) stdenv runCommand substituteAll;
|
||||
inherit (pkgs) stdenv perl runCommand substituteAll;
|
||||
inherit nix;
|
||||
nixpkgsURL = config.get ["installer" "nixpkgsURL"];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user