diff options
author | GenericNerdyUsername <genericnerdyusername@proton.me> | 2023-09-17 15:18:12 +0100 |
---|---|---|
committer | GenericNerdyUsername <genericnerdyusername@proton.me> | 2023-12-03 19:29:20 +0000 |
commit | 73b4f7b939d0153e7c5d65314afe225a4d862532 (patch) | |
tree | e8ec70bb31663eabce070c90d029037f5133f138 | |
parent | de502c4d0ba96261e5de803e4d1d1925afd3e22f (diff) |
jetbrains.jdk: 17.0.7-b829.16 -> 17.0.8-b1000.8
-rw-r--r-- | pkgs/development/compilers/jetbrains-jdk/default.nix | 96 | ||||
-rw-r--r-- | pkgs/development/compilers/jetbrains-jdk/jcef.nix | 79 |
2 files changed, 92 insertions, 83 deletions
diff --git a/pkgs/development/compilers/jetbrains-jdk/default.nix b/pkgs/development/compilers/jetbrains-jdk/default.nix index 9d5e53700c176..5a77429741b35 100644 --- a/pkgs/development/compilers/jetbrains-jdk/default.nix +++ b/pkgs/development/compilers/jetbrains-jdk/default.nix @@ -27,6 +27,8 @@ , udev }: +# TODO respect $NIX_BUILD_CORES + let arch = { "aarch64-linux" = "aarch64"; @@ -36,27 +38,28 @@ let in openjdk17.overrideAttrs (oldAttrs: rec { pname = "jetbrains-jdk-jcef"; - javaVersion = "17.0.7"; - build = "829.16"; + javaVersion = "17.0.8"; + build = "1000.8"; # To get the new tag: # git clone https://github.com/jetbrains/jetbrainsruntime # cd jetbrainsruntime # git reset --hard [revision] - # git log --simplify-by-decoration --decorate=short --pretty=short | grep "jdk-" | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | sort -t "-" -k 2 -g | tail -n 1 - openjdkTag = "jdk-18+0"; + # git log --simplify-by-decoration --decorate=short --pretty=short | grep "jbr-" --color=never | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | sort -t "-" -k 2 -g | tail -n 1 | tr -d "," + openjdkTag = "jbr-17.0.7+7"; version = "${javaVersion}-b${build}"; src = fetchFromGitHub { owner = "JetBrains"; repo = "JetBrainsRuntime"; rev = "jb${version}"; - hash = "sha256-b3wW52knkYUeG8h4naTQLGUedhAMiPnUsn3zFAiJCwM="; + hash = "sha256-PXS8wRF37D9vzeC4CvmB3szFMbt+NRqhQqtPZcbeAO8="; }; BOOT_JDK = openjdk17-bootstrap.home; - SOURCE_DATE_EPOCH = 1666098567; + # run `git log -1 --pretty=%ct` in jdk repo for new value on update + SOURCE_DATE_EPOCH = 1691119859; - patches = []; + patches = [ ]; # Configure is done in build phase configurePhase = "true"; @@ -64,8 +67,7 @@ openjdk17.overrideAttrs (oldAttrs: rec { buildPhase = '' runHook preBuild - mkdir -p jcef_linux_${arch}/jmods - cp ${jetbrains.jcef}/* jcef_linux_${arch}/jmods + cp -r ${jetbrains.jcef} jcef_linux_${arch} sed \ -e "s/OPENJDK_TAG=.*/OPENJDK_TAG=${openjdkTag}/" \ @@ -84,17 +86,19 @@ openjdk17.overrideAttrs (oldAttrs: rec { runHook postBuild ''; - installPhase = let - buildType = if debugBuild then "fastdebug" else "release"; - debugSuffix = lib.optionalString debugBuild "-fastdebug"; - jcefSuffix = lib.optionalString (!debugBuild) "_jcef"; - in '' - runHook preInstall + installPhase = + let + buildType = if debugBuild then "fastdebug" else "release"; + debugSuffix = if debugBuild then "-fastdebug" else ""; + jcefSuffix = if debugBuild then "" else "_jcef"; + jbrsdkDir = "jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build}"; + in + '' + runHook preInstall - mv build/linux-${cpu}-server-${buildType}/images/jdk/man build/linux-${cpu}-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build} - rm -rf build/linux-${cpu}-server-${buildType}/images/jdk - mv build/linux-${cpu}-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build} build/linux-${cpu}-server-${buildType}/images/jdk - '' + oldAttrs.installPhase + "runHook postInstall"; + rm -rf build/linux-${cpu}-server-${buildType}/images/jdk + mv build/linux-${cpu}-server-${buildType}/images/${jbrsdkDir} build/linux-${cpu}-server-${buildType}/images/jdk + '' + oldAttrs.installPhase + "runHook postInstall"; postInstall = '' chmod +x $out/lib/openjdk/lib/chrome-sandbox @@ -103,40 +107,40 @@ openjdk17.overrideAttrs (oldAttrs: rec { dontStrip = debugBuild; postFixup = '' - # Build the set of output library directories to rpath against - LIBDIRS="${lib.makeLibraryPath [ - libXdamage libXxf86vm libXrandr libXi libXcursor libXrender libX11 libXext libxcb - nss nspr libdrm mesa wayland udev - ]}" - for output in $outputs; do - if [ "$output" = debug ]; then continue; fi - LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | tr '\n' ':'):$LIBDIRS" - done - # Add the local library paths to remove dependencies on the bootstrap - for output in $outputs; do - if [ "$output" = debug ]; then continue; fi - OUTPUTDIR=$(eval echo \$$output) - BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*) - echo "$BINLIBS" | while read i; do - patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true - patchelf --shrink-rpath "$i" || true - done + # Build the set of output library directories to rpath against + LIBDIRS="${lib.makeLibraryPath [ + libXdamage libXxf86vm libXrandr libXi libXcursor libXrender libX11 libXext libxcb + nss nspr libdrm mesa wayland udev + ]}" + for output in $outputs; do + if [ "$output" = debug ]; then continue; fi + LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | tr '\n' ':'):$LIBDIRS" + done + # Add the local library paths to remove dependencies on the bootstrap + for output in $outputs; do + if [ "$output" = debug ]; then continue; fi + OUTPUTDIR=$(eval echo \$$output) + BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*) + echo "$BINLIBS" | while read i; do + patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true + patchelf --shrink-rpath "$i" || true done - ''; + done + ''; nativeBuildInputs = [ git autoconf unzip rsync ] ++ oldAttrs.nativeBuildInputs; meta = with lib; { description = "An OpenJDK fork to better support Jetbrains's products."; longDescription = '' - JetBrains Runtime is a runtime environment for running IntelliJ Platform - based products on Windows, Mac OS X, and Linux. JetBrains Runtime is - based on OpenJDK project with some modifications. These modifications - include: Subpixel Anti-Aliasing, enhanced font rendering on Linux, HiDPI - support, ligatures, some fixes for native crashes not presented in - official build, and other small enhancements. - JetBrains Runtime is not a certified build of OpenJDK. Please, use at - your own risk. + JetBrains Runtime is a runtime environment for running IntelliJ Platform + based products on Windows, Mac OS X, and Linux. JetBrains Runtime is + based on OpenJDK project with some modifications. These modifications + include: Subpixel Anti-Aliasing, enhanced font rendering on Linux, HiDPI + support, ligatures, some fixes for native crashes not presented in + official build, and other small enhancements. + JetBrains Runtime is not a certified build of OpenJDK. Please, use at + your own risk. ''; homepage = "https://confluence.jetbrains.com/display/JBR/JetBrains+Runtime"; inherit (openjdk17.meta) license platforms mainProgram; diff --git a/pkgs/development/compilers/jetbrains-jdk/jcef.nix b/pkgs/development/compilers/jetbrains-jdk/jcef.nix index a36eae8be52d3..893f43f7ec8e2 100644 --- a/pkgs/development/compilers/jetbrains-jdk/jcef.nix +++ b/pkgs/development/compilers/jetbrains-jdk/jcef.nix @@ -44,35 +44,36 @@ assert !stdenv.isDarwin; # I can't test darwin -let rpath = lib.makeLibraryPath [ - glib - nss - nspr - atk - at-spi2-atk - libdrm - expat - libxcb - libxkbcommon - libX11 - libXcomposite - libXdamage - libXext - libXfixes - libXrandr - mesa - gtk3 - pango - cairo - alsa-lib - dbus - at-spi2-core - cups - libxshmfence - udev -]; - -buildType = if debugBuild then "Debug" else "Release"; +let + rpath = lib.makeLibraryPath [ + glib + nss + nspr + atk + at-spi2-atk + libdrm + expat + libxcb + libxkbcommon + libX11 + libXcomposite + libXdamage + libXext + libXfixes + libXrandr + mesa + gtk3 + pango + cairo + alsa-lib + dbus + at-spi2-core + cups + libxshmfence + udev + ]; + + buildType = if debugBuild then "Debug" else "Release"; platform = { "aarch64-linux" = "linuxarm64"; "x86_64-linux" = "linux64"; @@ -91,13 +92,14 @@ arches = { }.${platform}; inherit (arches) depsArch projectArch targetArch; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "jcef-jetbrains"; - rev = "1ac1c682c497f2b864f86050796461f22935ea64"; + rev = "9f8d4fb20b4658db6b2b6bc08e5dd0d8c7340290"; # This is the commit number # Currently from the branch: https://github.com/JetBrains/jcef/tree/232 # Run `git rev-list --count HEAD` - version = "672"; + version = "675"; nativeBuildInputs = [ cmake python3 jdk17 git rsync ant ninja ]; buildInputs = [ libX11 libXdamage nss nspr ]; @@ -106,9 +108,10 @@ in stdenv.mkDerivation rec { owner = "jetbrains"; repo = "jcef"; inherit rev; - hash = "sha256-3HuW8upR/bZoK8euVti2KpCZh9xxfqgyHmgoG1NjxOI="; + hash = "sha256-8zsgcWl0lZtC1oud5IlkUdeXxJUlHoRfw8t0FrZUQec="; }; cef-bin = let + # `cef_binary_${CEF_VERSION}_linux64_minimal`, where CEF_VERSION is from $src/CMakeLists.txt name = "cef_binary_111.2.1+g870da30+chromium-111.0.5563.64_${platform}_minimal"; hash = { "linuxarm64" = "sha256-gCDIfWsysXE8lHn7H+YM3Jag+mdbWwTQpJf0GKdXEVs="; @@ -228,7 +231,9 @@ in stdenv.mkDerivation rec { mkdir lib cp -R "$OUT_NATIVE_DIR"/* lib - mkdir $out + mkdir -p $out/jmods + + bash "$JB_TOOLS_DIR"/common/create_version_file.sh $out runHook postInstall ''; @@ -237,11 +242,11 @@ in stdenv.mkDerivation rec { postFixup = '' cd $unpacked/gluegen - jmod create --class-path gluegen-rt.jar --libs lib $out/gluegen.rt.jmod + jmod create --class-path gluegen-rt.jar --libs lib $out/jmods/gluegen.rt.jmod cd ../jogl - jmod create --module-path . --class-path jogl-all.jar --libs lib $out/jogl.all.jmod + jmod create --module-path . --class-path jogl-all.jar --libs lib $out/jmods/jogl.all.jmod cd ../jcef - jmod create --module-path . --class-path jcef.jar --libs lib $out/jcef.jmod + jmod create --module-path . --class-path jcef.jar --libs lib $out/jmods/jcef.jmod ''; meta = { |