nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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
5#
6
7source "$NIX_ATTRS_SH_FILE"
8
9echo "exporting $url (rev $rev) into $out"
10
11runHook preFetch
12
13if [ -n "$gitConfigFile" ]; then
14 echo "using GIT_CONFIG_GLOBAL=$gitConfigFile"
15 export GIT_CONFIG_GLOBAL="$gitConfigFile"
16fi
17
18$SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" --name "$name" \
19 ${leaveDotGit:+--leave-dotGit} \
20 ${fetchLFS:+--fetch-lfs} \
21 ${deepClone:+--deepClone} \
22 ${fetchSubmodules:+--fetch-submodules} \
23 ${fetchTags:+--fetch-tags} \
24 ${sparseCheckoutText:+--sparse-checkout "$sparseCheckoutText"} \
25 ${nonConeMode:+--non-cone-mode} \
26 ${branchName:+--branch-name "$branchName"} \
27 ${rootDir:+--root-dir "$rootDir"}
28
29runHook postFetch