about summary refs log tree commit diff
path: root/pkgs/build-support/release/ant-build.nix
diff options
context:
space:
mode:
authorDaniel Peebles <pumpkin@me.com>2014-08-14 01:20:44 -0400
committerDaniel Peebles <pumpkin@me.com>2014-08-14 01:20:44 -0400
commita57025118784f100afcdf0aa1f015a15e4080bb9 (patch)
tree373a2a269ed5d48014038a8eaf77549900c48ef1 /pkgs/build-support/release/ant-build.nix
parentf65202666c3d7dafa1f451ddd09232feecdfb5ae (diff)
downloadnixlib-a57025118784f100afcdf0aa1f015a15e4080bb9.tar
nixlib-a57025118784f100afcdf0aa1f015a15e4080bb9.tar.gz
nixlib-a57025118784f100afcdf0aa1f015a15e4080bb9.tar.bz2
nixlib-a57025118784f100afcdf0aa1f015a15e4080bb9.tar.lz
nixlib-a57025118784f100afcdf0aa1f015a15e4080bb9.tar.xz
nixlib-a57025118784f100afcdf0aa1f015a15e4080bb9.tar.zst
nixlib-a57025118784f100afcdf0aa1f015a15e4080bb9.zip
Make ant-build canonicalize the jars it produces so that we produce byte-for-byte identical jars (they normally contain timestamps and nondeterministic ordering of metadata lines)
Diffstat (limited to 'pkgs/build-support/release/ant-build.nix')
-rw-r--r--pkgs/build-support/release/ant-build.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/build-support/release/ant-build.nix b/pkgs/build-support/release/ant-build.nix
index 1ca3c65d3f25..409c98d8d3a3 100644
--- a/pkgs/build-support/release/ant-build.nix
+++ b/pkgs/build-support/release/ant-build.nix
@@ -11,6 +11,8 @@
 , ant ? pkgs.ant
 , jre ? pkgs.openjdk
 , hydraAntLogger ? pkgs.hydraAntLogger
+, zip ? pkgs.zip
+, unzip ? pkgs.unzip
 , ... } @ args:
 
 let
@@ -45,7 +47,10 @@ stdenv.mkDerivation (
          '' else stdenv.lib.concatMapStrings (j: ''
            cp -v ${j} $out/share/java
          '') jars }
+
+      . ${./functions.sh}
       for j in $out/share/java/*.jar ; do
+        canonicalizeJar $j
         echo file jar $j >> $out/nix-support/hydra-build-products
       done
     '';
@@ -95,7 +100,7 @@ stdenv.mkDerivation (
   {
     name = name + (if src ? version then "-" + src.version else "");
   
-    buildInputs = [ant jre] ++ stdenv.lib.optional (args ? buildInputs) args.buildInputs ;
+    buildInputs = [ant jre zip unzip] ++ stdenv.lib.optional (args ? buildInputs) args.buildInputs ;
 
     postHook = ''
       mkdir -p $out/nix-support