From e10001042d6fc2b4246f51b5fa1625b8bf7e8df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Sat, 28 Jun 2014 20:33:28 +0200 Subject: [PATCH] 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. --- pkgs/applications/editors/vim/configurable.nix | 2 +- pkgs/applications/editors/vim/default.nix | 2 +- pkgs/applications/graphics/photivo/default.nix | 2 +- pkgs/applications/misc/ocropus/default.nix | 2 +- .../science/electronics/kicad/default.nix | 4 ++-- pkgs/applications/science/logic/abc/default.nix | 2 +- .../applications/science/math/glsurf/default.nix | 2 +- .../window-managers/tabbed/default.nix | 2 +- pkgs/build-support/fetchbzr/builder.sh | 4 ++-- pkgs/build-support/fetchbzr/default.nix | 4 ++-- pkgs/build-support/fetchdarcs/builder.sh | 6 +++--- pkgs/build-support/fetchdarcs/default.nix | 4 ++-- pkgs/build-support/fetchhg/builder.sh | 4 ++-- pkgs/build-support/fetchhg/default.nix | 4 ++-- pkgs/development/lisp-modules/lisp-packages.nix | 2 +- pkgs/development/tools/packer/deps.nix | 16 ++++++++-------- pkgs/games/dwarf-therapist/default.nix | 2 +- pkgs/games/opentyrian/default.nix | 2 +- pkgs/servers/nsq/deps.nix | 2 +- pkgs/servers/serfdom/deps.nix | 8 ++++---- pkgs/tools/misc/ngrok/default.nix | 6 +++--- pkgs/tools/security/meo/default.nix | 2 +- pkgs/tools/system/storebrowse/default.nix | 2 +- 23 files changed, 43 insertions(+), 43 deletions(-) diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index 9e2abffc451e..e0d8de157b09 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -21,7 +21,7 @@ composableDerivation { # latest release args.fetchhg { url = "https://vim.googlecode.com/hg/"; - tag = "v7-4-316"; + rev = "v7-4-316"; sha256 = "0scxx33p1ky0wihk04xqpd6rygp1crm0hx446zbjwbsjj6xxn7sx"; }; diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix index 357de6249fa4..bf9472801731 100644 --- a/pkgs/applications/editors/vim/default.nix +++ b/pkgs/applications/editors/vim/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { src = fetchhg { url = "https://vim.googlecode.com/hg/"; - tag = "v7-4-316"; + rev = "v7-4-316"; sha256 = "0scxx33p1ky0wihk04xqpd6rygp1crm0hx446zbjwbsjj6xxn7sx"; }; diff --git a/pkgs/applications/graphics/photivo/default.nix b/pkgs/applications/graphics/photivo/default.nix index 61e3f666dca7..156966ac46c1 100644 --- a/pkgs/applications/graphics/photivo/default.nix +++ b/pkgs/applications/graphics/photivo/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchhg { url = "http://code.google.com/p/photivo/"; - tag = "d687864489da"; + rev = "d687864489da"; sha256 = "0f6y18k7db2ci6xn664zcwm1g1k04sdv7gg1yd5jk41bndjb7z8h"; }; diff --git a/pkgs/applications/misc/ocropus/default.nix b/pkgs/applications/misc/ocropus/default.nix index fef3209d11a6..240a975e611e 100644 --- a/pkgs/applications/misc/ocropus/default.nix +++ b/pkgs/applications/misc/ocropus/default.nix @@ -40,7 +40,7 @@ pythonPackages.buildPythonPackage rec { src = fetchhg { url = "https://code.google.com/p/ocropus.ocropy"; - tag = "a6e0fbd820ce"; + rev = "a6e0fbd820ce"; sha256 = "1s0v0gd6psfjp6lghwl2dj49h18mgf2n2z8hqzw8430nzhglnlvr"; }; diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix index 8adab57656ea..0e81616a0069 100644 --- a/pkgs/applications/science/electronics/kicad/default.nix +++ b/pkgs/applications/science/electronics/kicad/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { src = fetchbzr { url = "https://code.launchpad.net/~kicad-stable-committers/kicad/stable"; - revision = 4024; + rev = 4024; sha256 = "1sv1l2zpbn6439ccz50p05hvqg6j551aqra551wck9h3929ghly5"; }; srcLibrary = fetchbzr { url = "http://bazaar.launchpad.net/~kicad-lib-committers/kicad/library"; - revision = 293; + rev = 293; sha256 = "1wn9a4nhqyjzzfkq6xm7ag8n5n10xy7gkq6i7yry7wxini7pzv1i"; }; diff --git a/pkgs/applications/science/logic/abc/default.nix b/pkgs/applications/science/logic/abc/default.nix index a8076b9e29ea..30c36ae29dc8 100644 --- a/pkgs/applications/science/logic/abc/default.nix +++ b/pkgs/applications/science/logic/abc/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchhg { url = "https://bitbucket.org/alanmi/abc"; - tag = "03e221443d71e49e56cbc37f1907ee3b0ff3e7c9"; + rev = "03e221443d71e49e56cbc37f1907ee3b0ff3e7c9"; sha256 = "0ahrqg718y7xpv939f6x8w1kqh7wsja4pw8hca7j67j0qjdgb4lm"; }; diff --git a/pkgs/applications/science/math/glsurf/default.nix b/pkgs/applications/science/math/glsurf/default.nix index a056a32c64c2..c4352c46f92e 100644 --- a/pkgs/applications/science/math/glsurf/default.nix +++ b/pkgs/applications/science/math/glsurf/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { src = fetchdarcs { url = "http://lama.univ-savoie.fr/~raffalli/GlSurf"; - tag = "3.3"; + rev = "3.3"; sha256 = ""; md5=""; }; diff --git a/pkgs/applications/window-managers/tabbed/default.nix b/pkgs/applications/window-managers/tabbed/default.nix index 3ab950bf4d05..2dec3b2241f2 100644 --- a/pkgs/applications/window-managers/tabbed/default.nix +++ b/pkgs/applications/window-managers/tabbed/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { src = fetchhg { url = http://hg.suckless.org/tabbed; - tag = "d7542a6f6dc5"; + rev = "d7542a6f6dc5"; sha256 = "1963jsazfmh5k7923c1mfwppz1xbh48z16j0sa64fiscq22as2gj"; }; diff --git a/pkgs/build-support/fetchbzr/builder.sh b/pkgs/build-support/fetchbzr/builder.sh index 17567fdadd23..af1257d3688c 100644 --- a/pkgs/build-support/fetchbzr/builder.sh +++ b/pkgs/build-support/fetchbzr/builder.sh @@ -1,9 +1,9 @@ source "$stdenv/setup" -header "exporting \`$url' (revision $revision) into \`$out'" +header "exporting \`$url' (revision $rev) into \`$out'" # Perform a lightweight checkout so that we don't end up importing # all the repository's history. -bzr -Ossl.cert_reqs=none export -r "$revision" --format=dir "$out" "$url" +bzr -Ossl.cert_reqs=none export -r "$rev" --format=dir "$out" "$url" stopNest diff --git a/pkgs/build-support/fetchbzr/default.nix b/pkgs/build-support/fetchbzr/default.nix index 721250beeb3b..dd2c0363187a 100644 --- a/pkgs/build-support/fetchbzr/default.nix +++ b/pkgs/build-support/fetchbzr/default.nix @@ -1,5 +1,5 @@ { stdenv, bazaar }: -{ url, revision, sha256 }: +{ url, rev, sha256 }: stdenv.mkDerivation { name = "bzr-export"; @@ -11,5 +11,5 @@ stdenv.mkDerivation { outputHashMode = "recursive"; outputHash = sha256; - inherit url revision; + inherit url rev; } diff --git a/pkgs/build-support/fetchdarcs/builder.sh b/pkgs/build-support/fetchdarcs/builder.sh index efff5ff5ebf9..301deb98307f 100644 --- a/pkgs/build-support/fetchdarcs/builder.sh +++ b/pkgs/build-support/fetchdarcs/builder.sh @@ -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" diff --git a/pkgs/build-support/fetchdarcs/default.nix b/pkgs/build-support/fetchdarcs/default.nix index 63e4ecde88a5..3c2e0524eea5 100644 --- a/pkgs/build-support/fetchdarcs/default.nix +++ b/pkgs/build-support/fetchdarcs/default.nix @@ -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; } diff --git a/pkgs/build-support/fetchhg/builder.sh b/pkgs/build-support/fetchhg/builder.sh index 9699fb69b7fc..0b51ef79b235 100644 --- a/pkgs/build-support/fetchhg/builder.sh +++ b/pkgs/build-support/fetchhg/builder.sh @@ -1,9 +1,9 @@ source $stdenv/setup -header "getting $url${tag:+ ($tag)} into $out" +header "getting $url${rev:+ ($rev)} into $out" hg clone --insecure "$url" hg-clone -hg archive -q -y ${tag:+-r "$tag"} --cwd hg-clone $out +hg archive -q -y ${rev:+-r "$rev"} --cwd hg-clone $out rm -f $out/.hg_archival.txt stopNest diff --git a/pkgs/build-support/fetchhg/default.nix b/pkgs/build-support/fetchhg/default.nix index 1aebb7ecc877..4675cbe6ec80 100644 --- a/pkgs/build-support/fetchhg/default.nix +++ b/pkgs/build-support/fetchhg/default.nix @@ -1,4 +1,4 @@ -{stdenv, mercurial, nix}: {name ? null, url, tag ? null, md5 ? null, sha256 ? null}: +{stdenv, mercurial, nix}: {name ? null, url, rev ? null, md5 ? null, sha256 ? null}: # TODO: statically check if mercurial as the https support if the url starts woth https. stdenv.mkDerivation { @@ -13,6 +13,6 @@ stdenv.mkDerivation { outputHashMode = "recursive"; outputHash = if md5 != null then md5 else sha256; - inherit url tag; + inherit url rev; preferLocalBuild = true; } diff --git a/pkgs/development/lisp-modules/lisp-packages.nix b/pkgs/development/lisp-modules/lisp-packages.nix index f7d6dd2676d6..14c996fa05a8 100644 --- a/pkgs/development/lisp-modules/lisp-packages.nix +++ b/pkgs/development/lisp-modules/lisp-packages.nix @@ -37,7 +37,7 @@ let lispPackages = rec { src = pkgs.fetchdarcs { url = "http://common-lisp.net/project/iterate/darcs/iterate"; sha256 = "0m3q0s7h5s8varwx584m2akgdslj14df7kg4w1bj1fbgzsag5m1w"; - tag=version; + rev = version; }; overrides = x: { configurePhase="buildPhase(){ true; }"; diff --git a/pkgs/development/tools/packer/deps.nix b/pkgs/development/tools/packer/deps.nix index 4c8a376991aa..ce56ecad8a28 100644 --- a/pkgs/development/tools/packer/deps.nix +++ b/pkgs/development/tools/packer/deps.nix @@ -15,7 +15,7 @@ let root = "code.google.com/p/go.crypto"; src = fetchhg { url = "http://code.google.com/p/go.crypto"; - tag = "199"; + rev = "199"; sha256 = "0ibrpc6kknzl6a2g2fkxn03mvrd635lcnvf4a9rk1dfrpjbpcixh"; }; } @@ -23,7 +23,7 @@ let root = "code.google.com/p/goauth2"; src = fetchhg { url = "http://code.google.com/p/goauth2"; - tag = "67"; + rev = "67"; sha256 = "053vajj8hd9869by7z9qfgzn84h6avpcjvyxcyw5jml8dsln4bah"; }; } @@ -31,7 +31,7 @@ let root = "code.google.com/p/google-api-go-client"; src = fetchhg { url = "http://code.google.com/p/google-api-go-client"; - tag = "111"; + rev = "111"; sha256 = "1ib8i1c2mb86lkrr5w7bgwb70gkqmp860wa3h1j8080gxdx3yy16"; }; } @@ -39,7 +39,7 @@ let root = "code.google.com/p/gosshold"; src = fetchhg { url = "http://code.google.com/p/gosshold"; - tag = "2"; + rev = "2"; sha256 = "1ljl8pcxxfz5rv89b2ajd31gxxzifl57kzpksvdhyjdxh98gkvg8"; }; } @@ -65,7 +65,7 @@ let root = "launchpad.net/tomb"; src = fetchbzr { url = "https://launchpad.net/tomb"; - revision = "17"; + rev = "17"; sha256 = "1cjw0sr9hald1darq6n8akfpkzcgrk3mcq59hga3ibf2lrg35ha0"; }; } @@ -82,7 +82,7 @@ let root = "code.google.com/p/goprotobuf"; src = fetchhg { url = "http://code.google.com/p/goprotobuf"; - tag = "246"; + rev = "246"; sha256 = "0k4wcv1dnkwcp0gdrajj6kr25f1lg4lgpbi0h5v9l9n7sdwzplf4"; }; } @@ -135,7 +135,7 @@ let root = "launchpad.net/gocheck"; src = fetchbzr { url = "https://launchpad.net/gocheck"; - revision = "87"; + rev = "87"; sha256 = "1y9fa2mv61if51gpik9isls48idsdz87zkm1p3my7swjdix7fcl0"; }; } @@ -278,7 +278,7 @@ let root = "launchpad.net/mgo"; src = fetchbzr { url = "https://launchpad.net/mgo"; - revision = "2"; + rev = "2"; sha256 = "0h1dxzyx5c4r4gfnmjxv92hlhjxrgx9p4g53p4fhmz6x2fdglb0x"; }; } diff --git a/pkgs/games/dwarf-therapist/default.nix b/pkgs/games/dwarf-therapist/default.nix index c7e594f89bda..1a026132e525 100644 --- a/pkgs/games/dwarf-therapist/default.nix +++ b/pkgs/games/dwarf-therapist/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchhg { url = "https://code.google.com/r/splintermind-attributes/"; - tag = rev; + inherit rev; sha256 = "0a9m967q6p2q3plrl6qysg1xrdmg65jzil6awjh2wr3g10x2x15z"; }; diff --git a/pkgs/games/opentyrian/default.nix b/pkgs/games/opentyrian/default.nix index 260b146217cc..6b9c48473673 100644 --- a/pkgs/games/opentyrian/default.nix +++ b/pkgs/games/opentyrian/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchhg { url = "https://opentyrian.googlecode.com/hg/"; - tag = "13ef8ce47362"; + rev = "13ef8ce47362"; md5 = "95c8f9e7ff3d4207f1c692c7cec6c9b0"; }; diff --git a/pkgs/servers/nsq/deps.nix b/pkgs/servers/nsq/deps.nix index 8518ceed9169..bd98357ece62 100644 --- a/pkgs/servers/nsq/deps.nix +++ b/pkgs/servers/nsq/deps.nix @@ -6,7 +6,7 @@ let root = "code.google.com/p/snappy-go"; src = fetchhg { url = "http://code.google.com/p/snappy-go"; - tag = "14"; + rev = "14"; sha256 = "0ywa52kcii8g2a9lbqcx8ghdf6y56lqq96sl5nl9p6h74rdvmjr7"; }; } diff --git a/pkgs/servers/serfdom/deps.nix b/pkgs/servers/serfdom/deps.nix index d4da74b54767..b933c6088244 100644 --- a/pkgs/servers/serfdom/deps.nix +++ b/pkgs/servers/serfdom/deps.nix @@ -6,7 +6,7 @@ let root = "code.google.com/p/go.net"; src = fetchhg { url = "http://code.google.com/p/go.net"; - tag = "134"; + rev = "134"; sha256 = "1jycpgrfwgkfac60zjbx6babcz7sgyn9xgy6cr3l811j6k8r2pbv"; }; } @@ -14,7 +14,7 @@ let root = "code.google.com/p/go.text"; src = fetchhg { url = "http://code.google.com/p/go.text"; - tag = "85"; + rev = "85"; sha256 = "1x8h6vq9g5gbi7iiwla6dkaaqqf7wmkdm4szj7wvzlsijf2x8dwr"; }; } @@ -157,7 +157,7 @@ let root = "launchpad.net/gocheck"; src = fetchbzr { url = "https://launchpad.net/gocheck"; - revision = "87"; + rev = "87"; sha256 = "1y9fa2mv61if51gpik9isls48idsdz87zkm1p3my7swjdix7fcl0"; }; } @@ -165,7 +165,7 @@ let root = "launchpad.net/mgo"; src = fetchbzr { url = "https://launchpad.net/mgo"; - revision = "2"; + rev = "2"; sha256 = "0h1dxzyx5c4r4gfnmjxv92hlhjxrgx9p4g53p4fhmz6x2fdglb0x"; }; } diff --git a/pkgs/tools/misc/ngrok/default.nix b/pkgs/tools/misc/ngrok/default.nix index e517dba7c550..6435923b48a7 100644 --- a/pkgs/tools/misc/ngrok/default.nix +++ b/pkgs/tools/misc/ngrok/default.nix @@ -30,16 +30,16 @@ let url = "https://launchpad.net/goyaml"; sha256 = "03is37cgw62cha316xrs5h7q97im46ry5qldkfvbhimjq3ww0swj"; # Branch: "branch:lp:goyaml" - revision = 47; + rev = 47; }; log4go = fetchhg { url = "https://code.google.com/p/log4go/"; - tag = "c3294304d93f"; + rev = "c3294304d93f"; sha256 = "0q906sxrmwir295virfibqvdzlaj340qh2r4ysx1ccjrjazc0q5p"; }; osext = fetchhg { url = "https://bitbucket.org/kardianos/osext"; - tag = "364fb57"; + rev = "364fb57"; sha256 = "1w9x2zj716agfd5x5497ajb9nz3ljar74768vjidsyly143vzjws"; }; in stdenv.mkDerivation rec { diff --git a/pkgs/tools/security/meo/default.nix b/pkgs/tools/security/meo/default.nix index e18b68c7593f..31736123a9f2 100644 --- a/pkgs/tools/security/meo/default.nix +++ b/pkgs/tools/security/meo/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { src = fetchhg { url = http://oss.stamfest.net/hg/meo; - tag = "b48e5f16cff8"; + rev = "b48e5f16cff8"; sha256 = "0ifg7y28s89i9gwda6fyj1jbrykbcvq8bf1m6rxmdcv5afi3arbq"; }; diff --git a/pkgs/tools/system/storebrowse/default.nix b/pkgs/tools/system/storebrowse/default.nix index c46372bcd4b6..1a3bfa69d1ad 100644 --- a/pkgs/tools/system/storebrowse/default.nix +++ b/pkgs/tools/system/storebrowse/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # This source has license BSD srcGoSqlite = fetchhg { url = "https://code.google.com/p/gosqlite/"; - tag = "5baefb109e18"; + rev = "5baefb109e18"; sha256 = "0mqfnx06jj15cs8pq9msny2z18x99hgk6mchnaxpg343nzdiz4zk"; };