70c36821c6
* added an experimental fetchdarcs function, based on fetchsvn (there are no expressions yet that use this function) svn path=/nixpkgs/trunk/; revision=4615
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
|