diff options
author | Marc Weber <marco-oweber@gmx.de> | 2007-11-13 01:26:54 +0000 |
---|---|---|
committer | Marc Weber <marco-oweber@gmx.de> | 2007-11-13 01:26:54 +0000 |
commit | 1627b94ee71120573a5bd348fc5a016af2ce6233 (patch) | |
tree | 577b23167b3024a8a0aceb2773a581186916a569 /pkgs/build-support/fetchcvs | |
parent | a205ebc23ad4fea0eb98d198b68dc8e1f8ef68ea (diff) | |
download | nixpkgs-1627b94ee71120573a5bd348fc5a016af2ce6233.tar nixpkgs-1627b94ee71120573a5bd348fc5a016af2ce6233.tar.gz nixpkgs-1627b94ee71120573a5bd348fc5a016af2ce6233.tar.bz2 nixpkgs-1627b94ee71120573a5bd348fc5a016af2ce6233.tar.lz nixpkgs-1627b94ee71120573a5bd348fc5a016af2ce6233.tar.xz nixpkgs-1627b94ee71120573a5bd348fc5a016af2ce6233.tar.zst nixpkgs-1627b94ee71120573a5bd348fc5a016af2ce6233.zip |
implemented proposal by niksnut.
Now you have to use either date= or tag= when specifying cvs revision svn path=/nixpkgs/trunk/; revision=9661
Diffstat (limited to 'pkgs/build-support/fetchcvs')
-rw-r--r-- | pkgs/build-support/fetchcvs/builder.sh | 13 | ||||
-rw-r--r-- | pkgs/build-support/fetchcvs/default.nix | 12 |
2 files changed, 16 insertions, 9 deletions
diff --git a/pkgs/build-support/fetchcvs/builder.sh b/pkgs/build-support/fetchcvs/builder.sh index 16aad96116d..be3e9e46355 100644 --- a/pkgs/build-support/fetchcvs/builder.sh +++ b/pkgs/build-support/fetchcvs/builder.sh @@ -1,8 +1,5 @@ source $stdenv/setup -if test -z "$tag"; then - tag="-DNOW" -fi # creating the export drictory and checking out there only to be able to # move the content without the root directory into $out ... # cvs -f -d "$url" export $tag -d "$out" "$module" @@ -10,6 +7,16 @@ fi # See als man Page for those options ensureDir $out export +set -x +if [ -n "$tag" ]; then + tag="-r $tag" +else + if [ -n "$date" ]; then + tag="-D $date" + else + tag="-D NOW" + fi +fi cd export; cvs -f -d "$url" export $tag "$module" mv */* $out diff --git a/pkgs/build-support/fetchcvs/default.nix b/pkgs/build-support/fetchcvs/default.nix index 6cd31ddaade..60463ec5644 100644 --- a/pkgs/build-support/fetchcvs/default.nix +++ b/pkgs/build-support/fetchcvs/default.nix @@ -1,13 +1,13 @@ # example tags: -# "-DNOW" (get current version) -# "-D2007-20-10" (get the last version before given date) -# "-r <tagname>" (get version by tag name) -{stdenv, cvs, nix}: {url, module, tag, sha256}: +# date="2007-20-10"; (get the last version before given date) +# tag="<tagname>" (get version by tag name) +# If you don't specify neither one date="NOW" will be used (get latest) + +{stdenv, cvs, nix}: {url, module, tag ? null, date ? null, sha256}: stdenv.mkDerivation { name = "cvs-export"; builder = ./builder.sh; buildInputs = [cvs nix]; - - inherit url module tag sha256; + inherit url module sha256 tag date; } |