diff options
-rw-r--r-- | pkgs/applications/misc/synergy/default.nix | 2 | ||||
-rw-r--r-- | pkgs/build-support/fetchcvs/builder.sh | 13 | ||||
-rw-r--r-- | pkgs/build-support/fetchcvs/default.nix | 12 |
3 files changed, 17 insertions, 10 deletions
diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix index b2b7af6f01418..7872c6abaaf72 100644 --- a/pkgs/applications/misc/synergy/default.nix +++ b/pkgs/applications/misc/synergy/default.nix @@ -5,7 +5,7 @@ args.stdenv.mkDerivation { src = args.fetchcvs { url = ":pserver:anonymous@synergy2.cvs.sourceforge.net:/cvsroot/synergy2"; module = "synergy"; - tag = "-DNOW"; + date = "NOW"; sha256 = "ef8e2ebfda6e43240051a7af9417092b2af50ece8b5c6c3fbd908ba91c4fe068"; }; diff --git a/pkgs/build-support/fetchcvs/builder.sh b/pkgs/build-support/fetchcvs/builder.sh index 16aad96116d58..be3e9e46355dc 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 6cd31ddaade71..60463ec56443e 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; } |