fetchbzr, fetchdarcs, fetchhg: use rev attr

This makes it match the behaviour of fetchgit and fetchsvn, so it's
easier to write scripts that support all of them.
This commit is contained in:
Benno Fünfstück
2014-06-28 21:06:10 +02:00
parent 9b7dbcc83e
commit e10001042d
23 changed files with 43 additions and 43 deletions
+3 -3
View File
@@ -2,9 +2,9 @@ source $stdenv/setup
tagtext=""
tagflags=""
if test -n "$tag"; then
tagtext="(tag $tag) "
tagflags="--tag=$tag"
if test -n "$rev"; then
tagtext="(tag $rev) "
tagflags="--tag=$rev"
elif test -n "$context"; then
tagtext="(context) "
tagflags="--context=$context"
+2 -2
View File
@@ -1,4 +1,4 @@
{stdenv, darcs, nix}: {url, tag ? null, context ? null, md5 ? "", sha256 ? ""}:
{stdenv, darcs, nix}: {url, rev ? null, context ? null, md5 ? "", sha256 ? ""}:
stdenv.mkDerivation {
name = "fetchdarcs";
@@ -9,5 +9,5 @@ stdenv.mkDerivation {
outputHashMode = "recursive";
outputHash = if sha256 == "" then md5 else sha256;
inherit url tag context;
inherit url rev context;
}