forked from mirrors/nixpkgs
* Use paths-from-graph.pl.
svn path=/nixos/trunk/; revision=7776
This commit is contained in:
parent
2554337f82
commit
d883483a0e
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, runCommand, substituteAll, nix
|
||||
{ stdenv, perl, runCommand, substituteAll, nix
|
||||
, # URL of the Nixpkgs distribution that the installer will pull.
|
||||
# Leave empty for a pure source distribution.
|
||||
nixpkgsURL ? ""
|
||||
|
@ -8,9 +8,9 @@ substituteAll {
|
|||
src = ./nixos-installer.sh;
|
||||
dir = "bin";
|
||||
isExecutable = true;
|
||||
inherit nix nixpkgsURL;
|
||||
inherit nix nixpkgsURL perl;
|
||||
|
||||
pathsFromGraph = ../helpers/paths-from-graph.sh;
|
||||
pathsFromGraph = ../helpers/paths-from-graph.pl;
|
||||
|
||||
nixClosure = runCommand "closure"
|
||||
{exportReferencesGraph = ["refs" nix];}
|
||||
|
|
|
@ -54,7 +54,7 @@ mount --bind /sys $mountPoint/sys
|
|||
cleanup() {
|
||||
# !!! don't umount any we didn't mount ourselves
|
||||
for i in $(grep -F "$mountPoint" /proc/mounts \
|
||||
| perl -e 'while (<>) { /^\S+\s+(\S+)\s+/; print "$1\n"; }' \
|
||||
| @perl@/bin/perl -e 'while (<>) { /^\S+\s+(\S+)\s+/; print "$1\n"; }' \
|
||||
| sort -r);
|
||||
do
|
||||
umount $i
|
||||
|
@ -83,7 +83,7 @@ mkdir -m 1777 -p \
|
|||
|
||||
|
||||
# Get the store paths to copy from the references graph.
|
||||
storePaths=$(@shell@ @pathsFromGraph@ @nixClosure@)
|
||||
storePaths=$(@perl@/bin/perl @pathsFromGraph@ @nixClosure@)
|
||||
|
||||
# Copy Nix to the Nix store on the target device.
|
||||
echo "copying Nix to $mountPoint...."
|
||||
|
|
Loading…
Reference in a new issue