summary refs log tree commit diff
path: root/pkgs/development/libraries/java/junit
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-24 16:07:20 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-25 03:04:46 +0100
commita17b090f990e288ddfc96116382526fe3c76543c (patch)
treeed68cbe4c145ad867e1c42cc19b71752ce73a955 /pkgs/development/libraries/java/junit
parent29a29c643878eadadec464537b2b07f7aab98b57 (diff)
downloadnixpkgs-a17b090f990e288ddfc96116382526fe3c76543c.tar
nixpkgs-a17b090f990e288ddfc96116382526fe3c76543c.tar.gz
nixpkgs-a17b090f990e288ddfc96116382526fe3c76543c.tar.bz2
nixpkgs-a17b090f990e288ddfc96116382526fe3c76543c.tar.lz
nixpkgs-a17b090f990e288ddfc96116382526fe3c76543c.tar.xz
nixpkgs-a17b090f990e288ddfc96116382526fe3c76543c.tar.zst
nixpkgs-a17b090f990e288ddfc96116382526fe3c76543c.zip
junit: Update to 4.11
Diffstat (limited to 'pkgs/development/libraries/java/junit')
-rwxr-xr-xpkgs/development/libraries/java/junit/builder.sh6
-rw-r--r--pkgs/development/libraries/java/junit/default.nix33
2 files changed, 25 insertions, 14 deletions
diff --git a/pkgs/development/libraries/java/junit/builder.sh b/pkgs/development/libraries/java/junit/builder.sh
deleted file mode 100755
index a76360ead1e..00000000000
--- a/pkgs/development/libraries/java/junit/builder.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-set -e
-source $stdenv/setup
-
-$unzip/bin/unzip $src
-mkdir -p $out
-mv junit*/* $out
diff --git a/pkgs/development/libraries/java/junit/default.nix b/pkgs/development/libraries/java/junit/default.nix
index 7a6db1ad4b3..888365f789f 100644
--- a/pkgs/development/libraries/java/junit/default.nix
+++ b/pkgs/development/libraries/java/junit/default.nix
@@ -1,17 +1,34 @@
-{stdenv, fetchurl, unzip} :
+{ stdenv, fetchurl }:
 
-stdenv.mkDerivation {
-  name = "junit-4.8.2";
-  builder = ./builder.sh;
+let
+
+  junit = fetchurl {
+    url = http://search.maven.org/remotecontent?filepath=junit/junit/4.11/junit-4.11.jar;
+    sha256 = "1zh6klzv8w30dx7jg6pkhllk4587av4znflzhxz8x97c7rhf3a4h";
+  };
 
-  src = fetchurl {
-    url = https://github.com/downloads/junit-team/junit/junit4.8.2.zip;
-    sha256 = "01simvc3pmgp27p7vzavmsx5rphm6hqzwrqfkwllhf3812dcqxy6";
+  hamcrest = fetchurl {
+    url = http://search.maven.org/remotecontent?filepath=org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar;
+    sha256 = "1sfqqi8p5957hs9yik44an3lwpv8ln2a6sh9gbgli4vkx68yzzb6";
   };
 
-  inherit unzip;
+in
+
+stdenv.mkDerivation {
+  name = "junit-4.11";
+
+  unpackPhase = "true";
+
+  installPhase =
+    ''
+      mkdir -p $out/share/java
+      ln -s ${junit} $out/share/java/junit.jar
+      ln -s ${hamcrest} $out/share/java/hamcrest-core.jar
+    '';
 
   meta = {
     homepage = http://www.junit.org/;
+    description = "A framework for repeatable tests in Java";
+    license = stdenv.lib.licenses.epl10;
   };
 }