summary refs log tree commit diff
path: root/pkgs/build-support/fetchhg/builder.sh
blob: 20dfde4b10d44a6651b3a231f71ab7a37efc31a3 (plain) (blame)
1
2
3
4
5
6
7
8
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .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