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