aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-copy-closure.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-10-11 11:45:36 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-10-11 11:45:36 +0000
commitc362e4d718cb31e532a4e2d708d07a57bc3bdf55 (patch)
tree526362a5740a7f6858ccab4e2776b21a84ea2ac2 /scripts/nix-copy-closure.in
parent7d314b8c959ca5c3dda8aea9c74079f4be63e19e (diff)
* Move SSH.pm.
Diffstat (limited to 'scripts/nix-copy-closure.in')
-rwxr-xr-xscripts/nix-copy-closure.in11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/nix-copy-closure.in b/scripts/nix-copy-closure.in
index c037f003f..966f860d0 100755
--- a/scripts/nix-copy-closure.in
+++ b/scripts/nix-copy-closure.in
@@ -1,8 +1,7 @@
-#! @perl@ -w -I@libexecdir@/nix
+#! @perl@ -w @perlFlags@
-use SSH;
-
-my $binDir = $ENV{"NIX_BIN_DIR"} || "@bindir@";
+use Nix::SSH;
+use Nix::Config;
if (scalar @ARGV < 1) {
@@ -61,7 +60,7 @@ if ($toMode) { # Copy TO the remote machine.
my @allStorePaths;
# Get the closure of this path.
- my $pid = open(READ, "set -f; $binDir/nix-store --query --requisites @storePaths|") or die;
+ my $pid = open(READ, "set -f; $Nix::Config::binDir/nix-store --query --requisites @storePaths|") or die;
while (<READ>) {
chomp;
@@ -130,7 +129,7 @@ else { # Copy FROM the remote machine.
print STDERR " $_\n" foreach @missing;
my $extraOpts = "";
$extraOpts .= "--sign" if $sign == 1;
- system("set -f; ssh $sshHost @sshOpts 'nix-store --export $extraOpts @missing $compressor' | $decompressor @bindir@/nix-store --import") == 0
+ system("set -f; ssh $sshHost @sshOpts 'nix-store --export $extraOpts @missing $compressor' | $decompressor $Nix::Config::binDir/nix-store --import") == 0
or die "copying store paths from remote machine `$sshHost' failed: $?";
}