From 2ffa48af259c2fc438b16aad1f27557625d7430b Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Wed, 25 Nov 2009 07:51:06 +0000 Subject: [PATCH] update maven2 svn path=/nixpkgs/trunk/; revision=18609 --- pkgs/misc/maven/builder.sh | 8 +------- pkgs/misc/maven/default.nix | 11 +++++------ pkgs/misc/maven/maven-2.nix | 23 ----------------------- pkgs/top-level/all-packages.nix | 6 ++---- 4 files changed, 8 insertions(+), 40 deletions(-) delete mode 100644 pkgs/misc/maven/maven-2.nix diff --git a/pkgs/misc/maven/builder.sh b/pkgs/misc/maven/builder.sh index 70bb54bbebe8..03e4a0414026 100644 --- a/pkgs/misc/maven/builder.sh +++ b/pkgs/misc/maven/builder.sh @@ -1,17 +1,11 @@ source $stdenv/setup -source $makeWrapper unpackPhase mkdir -p $out cp -r $name/* $out -# Make a backup of the original directory -cp -r $out/bin $out/bin-orig -# Remove the original mvn from the bin directory -rm $out/bin/$mavenBinary -# Set the JAVA_HOME variable when using Maven -makeWrapper "$out/bin-orig/$mavenBinary" "$out/bin/$mavenBinary" --set JAVA_HOME "$jdk" +wrapProgram $out/bin/mvn --set JAVA_HOME "$jdk" # Add the maven-axis and JIRA plugin by default when using maven 1.x if [ -e $out/bin/maven ] diff --git a/pkgs/misc/maven/default.nix b/pkgs/misc/maven/default.nix index cbc0309671e7..857949016504 100644 --- a/pkgs/misc/maven/default.nix +++ b/pkgs/misc/maven/default.nix @@ -1,16 +1,15 @@ -{stdenv, fetchurl, jdk}: +{stdenv, fetchurl, jdk, makeWrapper}: assert jdk != null; stdenv.mkDerivation { - name = "maven-2.0.3"; - mavenBinary = "mvn"; + name = "apache-maven-2.2.1"; builder = ./builder.sh; src = fetchurl { - url = http://apache.cs.uu.nl/dist/maven/binaries/maven-2.0.3-bin.tar.bz2; - md5 = "14b3a62c45f5c7b3a7f72f87ffadb8e0"; + url = mirror://apache/maven/binaries/apache-maven-2.2.1-bin.tar.gz; + sha256 = "0xnk08ndf1jx458sr5dfr8rh7wi92kyn887vqyzjm1ka91cnb8xr"; }; - makeWrapper = ../../build-support/make-wrapper/make-wrapper.sh; + buildInputs = [makeWrapper]; inherit jdk; } diff --git a/pkgs/misc/maven/maven-2.nix b/pkgs/misc/maven/maven-2.nix deleted file mode 100644 index 5dc46cf5de8f..000000000000 --- a/pkgs/misc/maven/maven-2.nix +++ /dev/null @@ -1,23 +0,0 @@ -args: with args; -stdenv.mkDerivation { - name = "maven-2.1.0-bin"; - - src = fetchurl { - # TODO mirrors - url = http://apache.mirroring.de/maven/binaries/apache-maven-2.1.0-bin.zip; - sha256 = "13xda2l05pqs7x8ig85i9dqbdbv970zfgqif4wgjz8nn36jbxpvd"; - }; - - buildInputs = [ unzip ]; - - phases = "unpackPhase installPhase"; - - installPhase = " - ensureDir \$out; mv * \$out - "; - - meta = { - description = "Java build tool"; - homepage = "apache.org"; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 04e9e2a7c577..2489894ebb2d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8294,10 +8294,8 @@ let inherit stdenv fetchurl jdk; }; - # don't have time for the source build right now - # maven2 - mvn_bin = import ../misc/maven/maven-2.nix { - inherit fetchurl stdenv unzip; + maven2 = import ../misc/maven { + inherit stdenv fetchurl jdk makeWrapper; }; nix = makeOverridable (import ../tools/package-management/nix) {