pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / build-support / fetchgit / builder.sh
blob95176beea8c13f1a39d6f274e12f1db1cb224e6e
1 # tested so far with:
2 # - no revision specified and remote has a HEAD which is used
3 # - revision specified and remote has a HEAD
4 # - revision specified and remote without HEAD
6 if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
7 source $stdenv/setup
9 echo "exporting $url (rev $rev) into $out"
11 $SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \
12 ${leaveDotGit:+--leave-dotGit} \
13 ${fetchLFS:+--fetch-lfs} \
14 ${deepClone:+--deepClone} \
15 ${fetchSubmodules:+--fetch-submodules} \
16 ${sparseCheckout:+--sparse-checkout "$sparseCheckout"} \
17 ${nonConeMode:+--non-cone-mode} \
18 ${branchName:+--branch-name "$branchName"}
20 runHook postFetch