1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 13:41:15 +02:00

* Adapted nix-pull to use the new substitute mechanism.

This commit is contained in:
Eelco Dolstra 2004-06-21 09:51:23 +00:00
parent 3f3a3ae87b
commit 37ee6cef99
8 changed files with 99 additions and 58 deletions

View file

@ -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