From a1d4f7cdd54325cac5a846614aaf0de7e94e69c7 Mon Sep 17 00:00:00 2001 From: Daniel Peebles Date: Sat, 9 Aug 2014 20:49:22 -0400 Subject: [PATCH 1/2] Add .DS_Store to gitignore so we Mac users don't accidentally pollute nixpkgs with ugliness --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d43399383a0..16aaf68b70b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ result-* /doc/manual.html /doc/manual.pdf .version-suffix + +.DS_Store \ No newline at end of file From d18ec20878d7573364ab4d5e58c4f1083d2933ae Mon Sep 17 00:00:00 2001 From: Daniel Peebles Date: Sat, 9 Aug 2014 20:50:16 -0400 Subject: [PATCH 2/2] Change junit to actually compile from source rather than download binaries --- .../libraries/java/junit/default.nix | 37 ++++++++----------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/pkgs/development/libraries/java/junit/default.nix b/pkgs/development/libraries/java/junit/default.nix index 888365f789f..b398a7a1147 100644 --- a/pkgs/development/libraries/java/junit/default.nix +++ b/pkgs/development/libraries/java/junit/default.nix @@ -1,30 +1,23 @@ -{ stdenv, fetchurl }: +{ stdenv, antBuild, fetchgit, perl }: let + version = "4.11"; +in antBuild { + name = "junit-${version}"; - junit = fetchurl { - url = http://search.maven.org/remotecontent?filepath=junit/junit/4.11/junit-4.11.jar; - sha256 = "1zh6klzv8w30dx7jg6pkhllk4587av4znflzhxz8x97c7rhf3a4h"; + # I think this is only used to generate the docs, and will likely disappear + # with the next release of junit since its build system completely changes. + buildInputs = [perl]; + + src = fetchgit { + url = "https://github.com/junit-team/junit.git"; + sha256 = "019azv0cfy2zs45c7g3r952gvjmikkq76p2ydr4q5252r0pzy9dr"; + rev = "c2e4d911fadfbd64444fb285342a8f1b72336169"; }; - 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 - ''; + antProperties = [ + { name = "version"; value = version; } + ]; meta = { homepage = http://www.junit.org/; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 15b8bf4e856..1c061bd8d3d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6461,7 +6461,7 @@ let stdenv = overrideInStdenv stdenv [gnumake380]; }; - junit = callPackage ../development/libraries/java/junit { }; + junit = callPackage ../development/libraries/java/junit { antBuild = releaseTools.antBuild; }; junixsocket = callPackage ../development/libraries/java/junixsocket { };