From 76c971009149f73453ccec66392625f2b67f8785 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 25 Sep 2006 10:29:25 +0000 Subject: [PATCH] * Use builtins.toPath. --- scripts/nix-push.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nix-push.in b/scripts/nix-push.in index 283d78a611..f11cd1f46f 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; }