aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-08-10 00:22:21 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-08-10 00:22:21 +0000
commit5e52df18fefb188b7c7a8e917ebeb8ea1f5ed95a (patch)
tree2aa8d6c5db4927cbefb2d79637c700ac5ac79fd6
parentc5e934dcc9f3c0e75cd14fd7dbab6048abf907d1 (diff)
* Don't rely on /dev/stdin.
-rw-r--r--scripts/nix-prefetch-url.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in
index 2c55f9f24..186804d8e 100644
--- a/scripts/nix-prefetch-url.in
+++ b/scripts/nix-prefetch-url.in
@@ -56,7 +56,8 @@ if test -z "$finalPath"; then
# the file *contents* is done in Nix store, where it can be
# garbage-collected independently.
if test -n "$NIX_DOWNLOAD_CACHE"; then
- urlHash="$(echo -n "$url" | nix-hash --type sha256 --base32 --flat /dev/stdin)"
+ echo -n "$url" > $tmpPath/url
+ urlHash=$(nix-hash --type sha256 --base32 --flat $tmpPath/url)
echo "$url" > "$NIX_DOWNLOAD_CACHE/$urlHash.url"
cachedHashFN="$NIX_DOWNLOAD_CACHE/$urlHash.$hashType"
cachedTimestampFN="$NIX_DOWNLOAD_CACHE/$urlHash.stamp"