diff --git a/scripts/nix-copy-closure.in b/scripts/nix-copy-closure.in index ec2df88289..80a6a80518 100644 --- a/scripts/nix-copy-closure.in +++ b/scripts/nix-copy-closure.in @@ -4,8 +4,20 @@ my $binDir = $ENV{"NIX_BIN_DIR"}; $binDir = "@bindir@" unless defined $binDir; +if (scalar @ARGV < 1) { + print STDERR <) { chomp; @@ -50,6 +66,8 @@ close READ or die; # Export the store paths and import them on the remote machine. if (scalar @missing > 0) { - system("nix-store --export @missing | ssh $sshHost nix-store --import") == 0 + my $extraOpts = ""; + $extraOpts .= "--sign" if $sign == 1; + system("nix-store --export $extraOpts @missing | ssh @sshOpts $sshHost nix-store --import") == 0 or die "copying store paths to remote machine failed: $?"; }