From 9ee88bb2f2fed3bcf34eb5e5caadced2e77a85da Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 14 Jan 2005 13:50:00 +0000 Subject: [PATCH] * Use absolute paths. --- scripts/download-using-manifests.pl.in | 12 ++++++------ scripts/nix-build.in | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/download-using-manifests.pl.in b/scripts/download-using-manifests.pl.in index 241b12d640..5d4193590b 100644 --- a/scripts/download-using-manifests.pl.in +++ b/scripts/download-using-manifests.pl.in @@ -73,7 +73,7 @@ addToQueue $targetPath; sub isValidPath { my $p = shift; - system "nix-store --isvalid '$p' 2> /dev/null"; + system "@bindir@/nix-store --isvalid '$p' 2> /dev/null"; return $? == 0; } @@ -96,7 +96,7 @@ while ($queueFront < scalar @queue) { foreach my $patch (@{$patchList}) { if (isValidPath($patch->{basePath})) { # !!! this should be cached - my $hash = `nix-hash "$patch->{basePath}"`; + my $hash = `@bindir@/nix-hash "$patch->{basePath}"`; chomp $hash; # print " MY HASH is $hash\n"; if ($hash ne $patch->{baseHash}) { @@ -177,7 +177,7 @@ sub downloadFile { my $hash = shift; $ENV{"PRINT_PATH"} = 1; $ENV{"QUIET"} = 1; - my ($hash2, $path) = `nix-prefetch-url '$url' '$hash'`; + my ($hash2, $path) = `@bindir@/nix-prefetch-url '$url' '$hash'`; chomp $hash2; chomp $path; die "hash mismatch" if $hash ne $hash2; @@ -210,7 +210,7 @@ while (scalar @path > 0) { # Turn the base path into a NAR archive, to which we can # actually apply the patch. print " packing base path...\n"; - system "nix-store --dump $patch->{basePath} > /tmp/nar"; + system "@bindir@/nix-store --dump $patch->{basePath} > /tmp/nar"; die "cannot dump `$patch->{basePath}'" if ($? != 0); # Apply the patch. @@ -220,7 +220,7 @@ while (scalar @path > 0) { # Unpack the resulting NAR archive into the target path. print " unpacking patched archive...\n"; - system "nix-store --restore $v < /tmp/nar2"; + system "@bindir@/nix-store --restore $v < /tmp/nar2"; die "cannot unpack /tmp/nar2 into `$v'" if ($? != 0); } @@ -236,7 +236,7 @@ while (scalar @path > 0) { # Unpack the archive into the target path. print " unpacking archive...\n"; - system "bunzip2 < '$narFilePath' | nix-store --restore '$v'"; + system "@bunzip2@ < '$narFilePath' | nix-store --restore '$v'"; die "cannot unpack `$narFilePath' into `$v'" if ($? != 0); } } diff --git a/scripts/nix-build.in b/scripts/nix-build.in index 43d818274b..a5d747686a 100644 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -19,11 +19,11 @@ for i in "$@"; do extraArgs="$extraArgs $i" ;; *) - storeExprs=$(nix-instantiate "$i") + storeExprs=$(@bindir@/nix-instantiate "$i") for j in $storeExprs; do echo "store expression is $j" >&2 done - outPaths=$(nix-store -qnfv $extraArgs $storeExprs) + outPaths=$(@bindir@/nix-store -qnfv $extraArgs $storeExprs) for j in $outPaths; do echo "$j" if test -z "$noLink"; then