about summary refs log tree commit diff
path: root/scripts/nix-prefetch-url.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-06-21T09·51+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-06-21T09·51+0000
commit37ee6cef992c1a80e790a294b75db8c116be8bbb (patch)
treec9296a3d00ce0768e6200d29b39d11beab48c406 /scripts/nix-prefetch-url.in
parent3f3a3ae87b3d72d52842d9a2ffe7010f5b0066b9 (diff)
* Adapted nix-pull to use the new substitute mechanism.
Diffstat (limited to 'scripts/nix-prefetch-url.in')
-rw-r--r--scripts/nix-prefetch-url.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in
index 6a90e787c3f5..45b3ed7ee75c 100644
--- a/scripts/nix-prefetch-url.in
+++ b/scripts/nix-prefetch-url.in
@@ -25,13 +25,17 @@ test -e $tmpPath2 || mv $tmpPath1 $tmpPath2 # !!! race
 storeExpr=$( \
   echo "(import @datadir@/nix/corepkgs/fetchurl) \
         {url = $url; md5 = \"$hash\"; system = \"@system@\";}" \
-  | nix-instantiate -)
+  | @bindir@/nix-instantiate -)
 
 # Realise it.
-finalPath=$(nix-store -qnB --force-realise $storeExpr)
+finalPath=$(@bindir@/nix-store -qnB --force-realise $storeExpr)
 
 echo "path is $finalPath" >&2
 
 rm -rf $tmpPath2 || true
 
 echo $hash
+
+if test -n "$PRINT_PATH"; then
+    echo $finalPath
+fi