summary refs log tree commit diff
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2022-12-06 20:15:23 +0000
committerThiago Kenji Okada <thiagokokada@gmail.com>2022-12-06 22:39:19 +0000
commitb51a1d1f67516591fe84b2a8d53e7b9f0130bddd (patch)
treed1c2839592b55a7c79cd1c4318abd97928aa19ce
parentad25aa109830df7e8a0237e33638cdccf3cc9daa (diff)
downloadnixpkgs-b51a1d1f67516591fe84b2a8d53e7b9f0130bddd.tar
nixpkgs-b51a1d1f67516591fe84b2a8d53e7b9f0130bddd.tar.gz
nixpkgs-b51a1d1f67516591fe84b2a8d53e7b9f0130bddd.tar.bz2
nixpkgs-b51a1d1f67516591fe84b2a8d53e7b9f0130bddd.tar.lz
nixpkgs-b51a1d1f67516591fe84b2a8d53e7b9f0130bddd.tar.xz
nixpkgs-b51a1d1f67516591fe84b2a8d53e7b9f0130bddd.tar.zst
nixpkgs-b51a1d1f67516591fe84b2a8d53e7b9f0130bddd.zip
openjfx11: 11.0.3+1 -> 11.0.11+1
This updates the Python version needed to build WebKit from 2 to 3,
fixing the previous issue we had.
-rw-r--r--pkgs/development/compilers/openjdk/openjfx/11.nix37
1 files changed, 22 insertions, 15 deletions
diff --git a/pkgs/development/compilers/openjdk/openjfx/11.nix b/pkgs/development/compilers/openjdk/openjfx/11.nix
index f67c1828913..1bbb4e42dbc 100644
--- a/pkgs/development/compilers/openjdk/openjfx/11.nix
+++ b/pkgs/development/compilers/openjdk/openjfx/11.nix
@@ -1,26 +1,36 @@
 { stdenv, lib, fetchurl, writeText, gradle_4, pkg-config, perl, cmake
-, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg_4-headless, python2, ruby
+, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg_4-headless, python3, ruby
 , openjdk11-bootstrap }:
 
 let
   major = "11";
-  update = ".0.3";
+  update = ".0.11";
   build = "1";
   repover = "${major}${update}+${build}";
   gradle_ = (gradle_4.override {
     java = openjdk11-bootstrap;
   });
 
+  NIX_CFLAGS_COMPILE = [
+    # avoids errors about deprecation of GTypeDebugFlags, GTimeVal, etc.
+    "-DGLIB_DISABLE_DEPRECATION_WARNINGS"
+    # glib-2.62 deprecations
+    # -fcommon: gstreamer workaround for -fno-common toolchains:
+    #   ld: gsttypefindelement.o:(.bss._gst_disable_registry_cache+0x0): multiple definition of
+    #     `_gst_disable_registry_cache'; gst.o:(.bss._gst_disable_registry_cache+0x0): first defined here
+    "-fcommon"
+  ];
+
   makePackage = args: stdenv.mkDerivation ({
     version = "${major}${update}-${build}";
 
     src = fetchurl {
-      url = "https://hg.openjdk.java.net/openjfx/${major}/rt/archive/${repover}.tar.gz";
-      sha256 = "1h7qsylr7rnwnbimqjyn3whszp9kv4h3gpicsrb3mradxc9yv194";
+      url = "https://hg.openjdk.java.net/openjfx/${major}-dev/rt/archive/${repover}.tar.gz";
+      sha256 = "sha256-mbEALUxuwbtlGeZ2Xsm3m3aNDdthLYWd6QHmdkAILxc=";
     };
 
     buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4-headless ];
-    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python2 ruby ];
+    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ];
 
     dontUseCmakeConfigure = true;
 
@@ -34,8 +44,7 @@ let
       JDK_HOME = ${openjdk11-bootstrap.home}
     '' + args.gradleProperties or "");
 
-    #avoids errors about deprecation of GTypeDebugFlags, GTimeVal, etc.
-    NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
+    inherit NIX_CFLAGS_COMPILE;
 
     buildPhase = ''
       runHook preBuild
@@ -67,8 +76,7 @@ let
     outputHashMode = "recursive";
     # Downloaded AWT jars differ by platform.
     outputHash = {
-      i686-linux = "0mjlyf6jvbis7nrm5d394sjv4hjw6k3753hr1nwdxk8skwc3ry08";
-      x86_64-linux = "0d4msxswdav1xsfkpr0qd3xgqkcbxzf47v1zdy5jmg5w4bs6a78a";
+      x86_64-linux = "sha256-syceJMUEknBDCHK8eGs6rUU3IQn+HnQfURfCrDxYPa8=";
     }.${stdenv.system} or (throw "Unsupported platform");
   };
 
@@ -91,11 +99,7 @@ in makePackage {
     cp -r build/modular-sdk $out
   '';
 
-  # glib-2.62 deprecations
-  # -fcommon: gstreamer workaround for -fno-common toolchains:
-  #   ld: gsttypefindelement.o:(.bss._gst_disable_registry_cache+0x0): multiple definition of
-  #     `_gst_disable_registry_cache'; gst.o:(.bss._gst_disable_registry_cache+0x0): first defined here
-  NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS -fcommon";
+  inherit NIX_CFLAGS_COMPILE;
 
   stripDebugList = [ "." ];
 
@@ -105,6 +109,9 @@ in makePackage {
       new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${openjdk11-bootstrap}[^:]*,,')"
       patchelf --set-rpath "$new_refs" "$lib"
     done
+
+    # Remove licenses, otherwise they may conflict with the ones included in the openjdk
+    rm -rf $out/modules_legal/*
   '';
 
   disallowedReferences = [ openjdk11-bootstrap ];
@@ -119,6 +126,6 @@ in makePackage {
     license = licenses.gpl2;
     description = "The next-generation Java client toolkit";
     maintainers = with maintainers; [ abbradar ];
-    platforms = [ "i686-linux" "x86_64-linux" ];
+    platforms = [ "x86_64-linux" ];
   };
 }