about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-push.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index 283d78a6117e..f11cd1f46f83 100644
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -105,12 +105,12 @@ open NIX, ">$nixfile";
 print NIX "[";
 
 foreach my $storePath (@storePaths) {
-    die unless ($storePath =~ /\/[0-9a-z]{32}.*$/);
+    die unless ($storePath =~ /\/[0-9a-z]{32}[^\"\\\$]*$/);
 
     # Construct a Nix expression that creates a Nix archive.
     my $nixexpr = 
         "((import $dataDir/nix/corepkgs/nar/nar.nix) " .
-        "{storePath = $storePath; system = \"@system@\"; hashAlgo = \"$hashAlgo\";}) ";
+        "{storePath = builtins.toPath \"$storePath\"; system = \"@system@\"; hashAlgo = \"$hashAlgo\";}) ";
     
     print NIX $nixexpr;
 }