From d9cebb072f46ed681d69de82b050dd1ec4857a4e Mon Sep 17 00:00:00 2001 From: Martin Bravenboer Date: Sun, 25 Jan 2004 00:50:00 +0000 Subject: [PATCH] Added Apache Ant, including configuration of JAVA_HOME and ANT_HOME. Currently only the shell script is patched, but this one is used most in practice. svn path=/nixpkgs/trunk/; revision=718 --- .../build-managers/apache-ant/builder.sh | 21 +++++++++++++++++++ .../build-managers/apache-ant/default.nix | 10 +++++++++ pkgs/system/all-packages-generic.nix | 6 ++++++ 3 files changed, 37 insertions(+) create mode 100755 pkgs/development/tools/build-managers/apache-ant/builder.sh create mode 100644 pkgs/development/tools/build-managers/apache-ant/default.nix diff --git a/pkgs/development/tools/build-managers/apache-ant/builder.sh b/pkgs/development/tools/build-managers/apache-ant/builder.sh new file mode 100755 index 000000000000..4478233712bf --- /dev/null +++ b/pkgs/development/tools/build-managers/apache-ant/builder.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +. $stdenv/setup || exit 1 + +tar xvfj $src || exit 1 + +mkdir -p $out +mv apache-ant-1.6.0/* $out || exit 1 + +rm -rf $out/docs +rm $out/* + +confpath=$out/etc/nixpaths.conf || exit 1 +sed "s^.etc.ant.conf^$confpath^g" $out/bin/ant > $out/bin/ant_temp || exit 1 +mv $out/bin/ant_temp $out/bin/ant || exit 1 +chmod u+xrw $out/bin/ant || exit 1 +chmod u+x $out/bin/* || exit 1 +echo " +JAVA_HOME=$j2sdk +ANT_HOME=$out +" > $confpath || exit 1 diff --git a/pkgs/development/tools/build-managers/apache-ant/default.nix b/pkgs/development/tools/build-managers/apache-ant/default.nix new file mode 100644 index 000000000000..52b5f9b524ba --- /dev/null +++ b/pkgs/development/tools/build-managers/apache-ant/default.nix @@ -0,0 +1,10 @@ +{stdenv, fetchurl, j2sdk}: derivation { + name = "apache-ant-1.6.0"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://dist.apache.easynet.nl/ant/binaries/apache-ant-1.6.0-bin.tar.bz2; + md5 = "01989c306da53862c101d9ea4ebb1f00"; + }; + stdenv = stdenv; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 85c67fc454ab..5eec9f232e06 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -240,6 +240,12 @@ stdenv = stdenv; }; + apacheant = (import ../development/tools/build-managers/apache-ant) { + fetchurl = fetchurl; + stdenv = stdenv; + j2sdk = j2sdk; + }; + pcre = (import ../development/libraries/pcre) { fetchurl = fetchurl; stdenv = stdenv;