forked from mirrors/nixpkgs
5d02f0e854
This patch resolves https://github.com/NixOS/nixpkgs/issues/6395. Deep cloning is useful in combination with 'leaveDotGit' for builds that want to run "git describe" to obtain a proper version string, etc., like the 'haskellngPackages.cabal2nix' package does.
15 lines
420 B
Bash
15 lines
420 B
Bash
# tested so far with:
|
|
# - no revision specified and remote has a HEAD which is used
|
|
# - revision specified and remote has a HEAD
|
|
# - revision specified and remote without HEAD
|
|
source $stdenv/setup
|
|
|
|
header "exporting $url (rev $rev) into $out"
|
|
|
|
$fetcher --builder --url "$url" --out "$out" --rev "$rev" \
|
|
${leaveDotGit:+--leave-dotGit} \
|
|
${deepClone:+--deepClone} \
|
|
${fetchSubmodules:+--fetch-submodules}
|
|
|
|
stopNest
|