From 94356324f5d57631d9b57745289455afc9e918fb Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 7 Jun 2010 13:58:13 +0000 Subject: antbuild: added 2 arguments, antbuildinputs (all jars are added to classpath) and buildfile (for different location of build.xml) svn path=/nixpkgs/trunk/; revision=22169 --- pkgs/build-support/release/ant-build.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pkgs/build-support/release') diff --git a/pkgs/build-support/release/ant-build.nix b/pkgs/build-support/release/ant-build.nix index 04eec99c7ed13..1e174f3e3f43e 100644 --- a/pkgs/build-support/release/ant-build.nix +++ b/pkgs/build-support/release/ant-build.nix @@ -5,10 +5,12 @@ , jars ? [] , jarWrappers ? [] , antProperties ? [] +, antBuildInputs ? [] +, buildfile ? "build.xml" , ... } @ args: let - antFlags = stdenv.lib.concatMapStrings ({name, value}: "-D${name}=${value}" ) antProperties ; + antFlags = "-f ${buildfile} " + stdenv.lib.concatMapStrings ({name, value}: "-D${name}=${value}" ) antProperties ; in stdenv.mkDerivation ( @@ -21,10 +23,13 @@ stdenv.mkDerivation ( prePhases = ["antSetupPhase"]; - antSetupPhase = '' + antSetupPhase = with stdenv.lib; '' if test "$hydraAntLogger" != "" ; then export ANT_ARGS="-logger org.hydra.ant.HydraLogger -lib `ls $hydraAntLogger/lib/java/*.jar | head -1`" fi + for abi in ${concatStringsSep " " (map (f: "`find ${f} -name '*.jar'`") antBuildInputs)}; do + export ANT_ARGS="$ANT_ARGS -lib $abi" + done ''; installPhase = '' @@ -33,8 +38,10 @@ stdenv.mkDerivation ( find . -name "*.jar" | xargs -I{} cp -v {} $out/lib/java '' else stdenv.lib.concatMapStrings (j: '' cp -v ${j} $out/lib/java - echo file jar $out/lib/java/${j} >> $out/nix-support/hydra-build-products '') jars } + for j in $out/lib/java ; do + echo file jar $out/lib/java/$j >> $out/nix-support/hydra-build-products + done ''; generateWrappersPhase = '' -- cgit 1.4.1