summary refs log tree commit diff
path: root/pkgs/development/compilers/openjdk/bootstrap.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-01-19 23:24:47 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-01-19 23:24:47 +0100
commit365ce3ddba0554c1a8c0ac0abd343ac907d04e66 (patch)
tree8c86e74ff47f33fbd60fdfb4e4371d52861c9d7f /pkgs/development/compilers/openjdk/bootstrap.nix
parentec6b82a0c2a6bffa2f76a9744105d6d7257c2636 (diff)
downloadnixlib-365ce3ddba0554c1a8c0ac0abd343ac907d04e66.tar
nixlib-365ce3ddba0554c1a8c0ac0abd343ac907d04e66.tar.gz
nixlib-365ce3ddba0554c1a8c0ac0abd343ac907d04e66.tar.bz2
nixlib-365ce3ddba0554c1a8c0ac0abd343ac907d04e66.tar.lz
nixlib-365ce3ddba0554c1a8c0ac0abd343ac907d04e66.tar.xz
nixlib-365ce3ddba0554c1a8c0ac0abd343ac907d04e66.tar.zst
nixlib-365ce3ddba0554c1a8c0ac0abd343ac907d04e66.zip
openjdk-bootstrap: Don't depend on the length of the Glibc version
Building the bootstrap OpenJDK failed if the Glibc version string is
not 4 characters, e.g. "2.12.1" would cause a corrupt tarball.
Diffstat (limited to 'pkgs/development/compilers/openjdk/bootstrap.nix')
-rw-r--r--pkgs/development/compilers/openjdk/bootstrap.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/compilers/openjdk/bootstrap.nix b/pkgs/development/compilers/openjdk/bootstrap.nix
index 222ab010c264..890064538cc0 100644
--- a/pkgs/development/compilers/openjdk/bootstrap.nix
+++ b/pkgs/development/compilers/openjdk/bootstrap.nix
@@ -16,9 +16,13 @@ let
 in
 
 runCommand "openjdk-bootstrap" {} ''
-  xz -dc ${src} | sed "s/e*-glibc-[^/]*/$(basename ${glibc})/g" | tar xv
+  tar xvf ${src}
   mv openjdk-bootstrap $out
 
+  for i in $out/bin/*; do
+    patchelf --set-interpreter ${glibc}/lib/ld-linux*.so.2 $i
+  done
+
   # Temporarily, while NixOS's OpenJDK bootstrap tarball doesn't have PaX markings:
   exes=$(${file}/bin/file $out/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
   for file in $exes; do