mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
gradle: Fix gradle-2.12 on Linux to find libstdc++.so reference in native library.
This commit is contained in:
parent
17f41a7996
commit
bbfad5111a
@ -4,6 +4,8 @@ rec {
|
||||
gradleGen = {name, src} : stdenv.mkDerivation rec {
|
||||
inherit name src;
|
||||
|
||||
buildPhase = ":";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out/lib/gradle/
|
||||
cp -rv lib/ $out/lib/gradle/
|
||||
@ -15,7 +17,21 @@ rec {
|
||||
--add-flags "-classpath $gradle_launcher_jar org.gradle.launcher.GradleMain"
|
||||
'';
|
||||
|
||||
phases = "unpackPhase installPhase";
|
||||
fixupPhase = if (!stdenv.isLinux) then ":" else
|
||||
let arch = if stdenv.is64bit then "amd64" else "i386"; in ''
|
||||
mkdir patching
|
||||
pushd patching
|
||||
jar xf $out/lib/gradle/lib/native-platform-linux-${arch}-0.10.jar
|
||||
patchelf --set-rpath "${stdenv.cc.cc}/lib:${stdenv.cc.cc}/lib64" net/rubygrapefruit/platform/linux-${arch}/libnative-platform.so
|
||||
jar cf native-platform-linux-${arch}-0.10.jar .
|
||||
mv native-platform-linux-${arch}-0.10.jar $out/lib/gradle/lib/
|
||||
popd
|
||||
|
||||
# The scanner doesn't pick up the runtime dependency in the jar.
|
||||
# Manually add a reference where it will be found.
|
||||
mkdir $out/nix-support
|
||||
echo ${stdenv.cc.cc} > $out/nix-support/manual-runtime-dependencies
|
||||
'';
|
||||
|
||||
buildInputs = [ unzip jdk makeWrapper ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user