2011-06-22 23:34:27 +04:00
|
|
|
# tested so far with:
|
|
|
|
# - no revision specified and remote has a HEAD which is used
|
|
|
|
# - revision specified and remote has a HEAD
|
2011-06-23 01:01:36 +04:00
|
|
|
# - revision specified and remote without HEAD
|
2022-12-08 02:51:03 +03:00
|
|
|
#
|
2023-09-28 16:09:26 +03:00
|
|
|
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
2009-06-24 16:48:01 +04:00
|
|
|
source $stdenv/setup
|
|
|
|
|
2023-01-16 01:08:12 +03:00
|
|
|
echo "exporting $url (rev $rev) into $out"
|
2009-06-24 16:48:01 +04:00
|
|
|
|
2013-12-21 16:48:06 +04:00
|
|
|
$SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \
|
2014-03-23 20:19:39 +04:00
|
|
|
${leaveDotGit:+--leave-dotGit} \
|
2020-12-05 10:32:48 +03:00
|
|
|
${fetchLFS:+--fetch-lfs} \
|
2015-03-10 14:40:19 +03:00
|
|
|
${deepClone:+--deepClone} \
|
2015-04-20 15:25:14 +03:00
|
|
|
${fetchSubmodules:+--fetch-submodules} \
|
2021-08-27 11:25:20 +03:00
|
|
|
${sparseCheckout:+--sparse-checkout "$sparseCheckout"} \
|
2022-08-04 22:26:03 +03:00
|
|
|
${nonConeMode:+--non-cone-mode} \
|
2015-04-20 15:25:14 +03:00
|
|
|
${branchName:+--branch-name "$branchName"}
|
2009-06-24 16:48:01 +04:00
|
|
|
|
2017-06-03 21:45:51 +03:00
|
|
|
runHook postFetch
|