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

8 lines
248 B
Bash

if [ -e .attrs.sh ]; then source .attrs.sh; fi
source $stdenv/setup
echo "getting $url${rev:+ ($rev)} into $out"
hg clone --insecure "$url" hg-clone
hg archive -q$subrepoClause -y ${rev:+-r "$rev"} --cwd hg-clone $out
rm -f $out/.hg_archival.txt