mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
* 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.
|
, # URL of the Nixpkgs distribution that the installer will pull.
|
||||||
# Leave empty for a pure source distribution.
|
# Leave empty for a pure source distribution.
|
||||||
nixpkgsURL ? ""
|
nixpkgsURL ? ""
|
||||||
@ -8,9 +8,9 @@ substituteAll {
|
|||||||
src = ./nixos-installer.sh;
|
src = ./nixos-installer.sh;
|
||||||
dir = "bin";
|
dir = "bin";
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit nix nixpkgsURL;
|
inherit nix nixpkgsURL perl;
|
||||||
|
|
||||||
pathsFromGraph = ../helpers/paths-from-graph.sh;
|
pathsFromGraph = ../helpers/paths-from-graph.pl;
|
||||||
|
|
||||||
nixClosure = runCommand "closure"
|
nixClosure = runCommand "closure"
|
||||||
{exportReferencesGraph = ["refs" nix];}
|
{exportReferencesGraph = ["refs" nix];}
|
||||||
|
@ -54,7 +54,7 @@ mount --bind /sys $mountPoint/sys
|
|||||||
cleanup() {
|
cleanup() {
|
||||||
# !!! don't umount any we didn't mount ourselves
|
# !!! don't umount any we didn't mount ourselves
|
||||||
for i in $(grep -F "$mountPoint" /proc/mounts \
|
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);
|
| sort -r);
|
||||||
do
|
do
|
||||||
umount $i
|
umount $i
|
||||||
@ -83,7 +83,7 @@ mkdir -m 1777 -p \
|
|||||||
|
|
||||||
|
|
||||||
# Get the store paths to copy from the references graph.
|
# 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.
|
# Copy Nix to the Nix store on the target device.
|
||||||
echo "copying Nix to $mountPoint...."
|
echo "copying Nix to $mountPoint...."
|
||||||
|
Loading…
Reference in New Issue
Block a user