antBuild: minor changes

svn path=/nixpkgs/trunk/; revision=24376
This commit is contained in:
Rob Vermaas 2010-10-20 08:23:52 +00:00
parent 40dd3ccf7b
commit 5a7fa1d061
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,6 @@
{ src { src
, stdenv , pkgs
, stdenv ? pkgs.stdenv
, name , name
, antTargets ? [] , antTargets ? []
, jars ? [] , jars ? []
@ -7,6 +8,9 @@
, antProperties ? [] , antProperties ? []
, antBuildInputs ? [] , antBuildInputs ? []
, buildfile ? "build.xml" , buildfile ? "build.xml"
, ant ? pkgs.ant
, jre ? pkgs.jre
, hydraAntLogger ? pkgs.hydraAntLogger
, ... } @ args: , ... } @ args:
let let
@ -79,11 +83,13 @@ stdenv.mkDerivation (
''; '';
} }
// removeAttrs args ["antProperties"] // // removeAttrs args ["antProperties" "buildInputs" "pkgs"] //
{ {
name = name + (if src ? version then "-" + src.version else ""); name = name + (if src ? version then "-" + src.version else "");
buildInputs = [ant jre] ++ stdenv.lib.optional (args ? buildInputs) args.buildInputs ;
postHook = '' postHook = ''
ensureDir $out/nix-support ensureDir $out/nix-support
echo "$system" > $out/nix-support/system echo "$system" > $out/nix-support/system

View File

@ -15,7 +15,7 @@ rec {
} // args); } // args);
antBuild = args: import ./ant-build.nix ( antBuild = args: import ./ant-build.nix (
{ inherit stdenv; { inherit pkgs;
} // args); } // args);
mvnBuild = args: import ./maven-build.nix ( mvnBuild = args: import ./maven-build.nix (