nixpkgs/pkgs/build-support/fetchdarcs/builder.sh
2023-01-16 00:08:12 +02:00

19 lines
415 B
Bash

if [ -e .attrs.sh ]; then source .attrs.sh; fi
source $stdenv/setup
tagtext=""
tagflags=""
if test -n "$rev"; then
tagtext="(tag $rev) "
tagflags="--tag=$rev"
elif test -n "$context"; then
tagtext="(context) "
tagflags="--context=$context"
fi
echo "getting $url $partial ${tagtext} into $out"
darcs get --lazy $tagflags "$url" "$out"
# remove metadata, because it can change
rm -rf "$out/_darcs"