mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
23 lines
426 B
Bash
23 lines
426 B
Bash
|
source $stdenv/setup
|
||
|
|
||
|
tagtext=""
|
||
|
tagflags=""
|
||
|
if test -n "$tag"; then
|
||
|
tagtext="(tag $tag) "
|
||
|
tagflags="--tag=$tag"
|
||
|
fi
|
||
|
|
||
|
header "getting $url ${tagtext}into $out"
|
||
|
|
||
|
darcs get --no-pristine-tree $tagflags "$url" "$out"
|
||
|
# remove metadata, because it can change
|
||
|
rm -rf "$out/_darcs"
|
||
|
|
||
|
actual=$(nix-hash $out)
|
||
|
if test "$actual" != "$outputHash"; then
|
||
|
echo "hash is $actual, expected $outputHash" >&2
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
stopNest
|