summary refs log tree commit diff
path: root/pkgs/development/libraries/java/junit/default.nix
blob: 888365f789f735abfb28a24d88e83964be85c89a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchurl }:

let

  junit = fetchurl {
    url = http://search.maven.org/remotecontent?filepath=junit/junit/4.11/junit-4.11.jar;
    sha256 = "1zh6klzv8w30dx7jg6pkhllk4587av4znflzhxz8x97c7rhf3a4h";
  };

  hamcrest = fetchurl {
    url = http://search.maven.org/remotecontent?filepath=org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar;
    sha256 = "1sfqqi8p5957hs9yik44an3lwpv8ln2a6sh9gbgli4vkx68yzzb6";
  };

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;
  };
}