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:
parent
3f3a3ae87b
commit
37ee6cef99
8 changed files with 99 additions and 58 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue