Merge pull request #12568 from gebner/idea-openjdk8
idea: fix problems with openjdk8
This commit is contained in:
commit
e8cc9204a8
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, fetchurl, makeDesktopItem, makeWrapper, patchelf, p7zip
|
{ stdenv, fetchurl, makeDesktopItem, makeWrapper, patchelf, p7zip
|
||||||
, coreutils, gnugrep, which, git, python, unzip, androidsdk }:
|
, coreutils, gnugrep, which, git, python, unzip, jdk }:
|
||||||
|
|
||||||
{ name, product, version, build, src, meta, jdk } @ attrs:
|
{ name, product, version, build, src, meta } @ attrs:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, callPackage, fetchurl, makeDesktopItem, makeWrapper, patchelf
|
{ stdenv, callPackage, fetchurl, makeDesktopItem, makeWrapper, patchelf
|
||||||
, coreutils, gnugrep, which, git, python, unzip, p7zip
|
, coreutils, gnugrep, which, git, python, unzip, p7zip
|
||||||
, androidsdk, jdk, oraclejdk8
|
, androidsdk, jdk
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert stdenv.isLinux;
|
assert stdenv.isLinux;
|
||||||
@ -8,12 +8,7 @@ assert stdenv.isLinux;
|
|||||||
let
|
let
|
||||||
|
|
||||||
bnumber = with stdenv.lib; build: last (splitString "-" build);
|
bnumber = with stdenv.lib; build: last (splitString "-" build);
|
||||||
mkIdeaProduct' = callPackage ./common.nix { };
|
mkIdeaProduct = callPackage ./common.nix { };
|
||||||
mkIdeaProduct = attrs: mkIdeaProduct' ({
|
|
||||||
# After IDEA 15 we can no longer use OpenJDK.
|
|
||||||
# https://youtrack.jetbrains.com/issue/IDEA-147272
|
|
||||||
jdk = if (bnumber attrs.build) < "143" then jdk else oraclejdk8;
|
|
||||||
} // attrs);
|
|
||||||
|
|
||||||
buildAndroidStudio = { name, version, build, src, license, description }:
|
buildAndroidStudio = { name, version, build, src, license, description }:
|
||||||
let drv = (mkIdeaProduct rec {
|
let drv = (mkIdeaProduct rec {
|
||||||
|
@ -141,6 +141,11 @@ let
|
|||||||
rm -rf $out/lib/openjdk/jre/bina
|
rm -rf $out/lib/openjdk/jre/bina
|
||||||
ln -s $out/lib/openjdk/bin $out/lib/openjdk/jre/bin
|
ln -s $out/lib/openjdk/bin $out/lib/openjdk/jre/bin
|
||||||
|
|
||||||
|
# Make sure cmm/*.pf are not symlinks:
|
||||||
|
# https://youtrack.jetbrains.com/issue/IDEA-147272
|
||||||
|
rm -rf $out/lib/openjdk/jre/lib/cmm
|
||||||
|
ln -s {$jre,$out}/lib/openjdk/jre/lib/cmm
|
||||||
|
|
||||||
# Set PaX markings
|
# Set PaX markings
|
||||||
exes=$(file $out/lib/openjdk/bin/* $jre/lib/openjdk/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
|
exes=$(file $out/lib/openjdk/bin/* $jre/lib/openjdk/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
|
||||||
echo "to mark: *$exes*"
|
echo "to mark: *$exes*"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user