mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
e10001042d
This makes it match the behaviour of fetchgit and fetchsvn, so it's easier to write scripts that support all of them.
19 lines
380 B
Bash
19 lines
380 B
Bash
source $stdenv/setup
|
|
|
|
tagtext=""
|
|
tagflags=""
|
|
if test -n "$rev"; then
|
|
tagtext="(tag $rev) "
|
|
tagflags="--tag=$rev"
|
|
elif test -n "$context"; then
|
|
tagtext="(context) "
|
|
tagflags="--context=$context"
|
|
fi
|
|
|
|
header "getting $url $partial ${tagtext} into $out"
|
|
|
|
darcs get --lazy $tagflags "$url" "$out"
|
|
# remove metadata, because it can change
|
|
rm -rf "$out/_darcs"
|
|
|
|
stopNest
|