diff options
Diffstat (limited to 'pkgs/development/compilers/openjdk/openjfx')
-rw-r--r-- | pkgs/development/compilers/openjdk/openjfx/11.nix | 136 | ||||
-rw-r--r-- | pkgs/development/compilers/openjdk/openjfx/15.nix | 129 | ||||
-rw-r--r-- | pkgs/development/compilers/openjdk/openjfx/17.nix | 128 | ||||
-rw-r--r-- | pkgs/development/compilers/openjdk/openjfx/19.nix | 148 | ||||
-rw-r--r-- | pkgs/development/compilers/openjdk/openjfx/20.nix | 135 | ||||
-rw-r--r-- | pkgs/development/compilers/openjdk/openjfx/21.nix | 132 | ||||
-rw-r--r-- | pkgs/development/compilers/openjdk/openjfx/22.nix | 137 |
7 files changed, 0 insertions, 945 deletions
diff --git a/pkgs/development/compilers/openjdk/openjfx/11.nix b/pkgs/development/compilers/openjdk/openjfx/11.nix deleted file mode 100644 index 22b844bb1d67..000000000000 --- a/pkgs/development/compilers/openjdk/openjfx/11.nix +++ /dev/null @@ -1,136 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, writeText, gradle_7, pkg-config, perl, cmake -, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg_4-headless, python3, ruby, fetchurl, runCommand -, openjdk11-bootstrap -, withMedia ? true -, withWebKit ? false -}: - -let - major = "11"; - update = ".0.20"; - build = "1"; - repover = "${major}${update}+${build}"; - gradle_ = (gradle_7.override { - java = openjdk11-bootstrap; - }); - - icuVersionWithSep = s: "71${s}1"; - icuPath = "download/release-${icuVersionWithSep "-"}/icu4c-${icuVersionWithSep "_"}-data-bin-l.zip"; - icuData = fetchurl { - url = "https://github.com/unicode-org/icu/releases/${icuPath}"; - hash = "sha256-pVWIy0BkICsthA5mxhR9SJQHleMNnaEcGl/AaLi5qZM="; - }; - icuFakeRepository = runCommand "icu-data-repository" {} '' - install -Dm644 ${icuData} $out/${icuPath} - ''; - - makePackage = args: stdenv.mkDerivation ({ - version = "${major}${update}-${build}"; - - src = fetchFromGitHub { - owner = "openjdk"; - repo = "jfx${major}u"; - rev = repover; - sha256 = "sha256-BbBP2DiPZTSn1SBYMCgyiNdF9GD+NqR6YjeVNOQHHn4="; - }; - - buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4-headless ]; - nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ]; - - dontUseCmakeConfigure = true; - - postPatch = '' - substituteInPlace buildSrc/linux.gradle \ - --replace ', "-Werror=implicit-function-declaration"' "" - - # Add missing includes for gcc-13 for webkit build: - sed -e '1i #include <cstdio>' \ - -i modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp \ - modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/IsoSharedPageInlines.h - ''; - - config = writeText "gradle.properties" ('' - CONF = Release - JDK_HOME = ${openjdk11-bootstrap.home} - '' + args.gradleProperties or ""); - - buildPhase = '' - runHook preBuild - - export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES - export GRADLE_USER_HOME=$(mktemp -d) - ln -s $config gradle.properties - export NIX_CFLAGS_COMPILE="$(pkg-config --cflags glib-2.0) $NIX_CFLAGS_COMPILE" - gradle --no-daemon --console=plain $gradleFlags sdk - - runHook postBuild - ''; - } // args); - - # Fake build to pre-download deps into fixed-output derivation. - # We run nearly full build because I see no other way to download everything that's needed. - # Anyone who knows a better way? - deps = makePackage { - pname = "openjfx-deps"; - - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME -type f -regex '.*/modules.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ - | sh - rm -rf $out/tmp - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "sha256-syceJMUEknBDCHK8eGs6rUU3IQn+HnQfURfCrDxYPa9="; - }; - -in makePackage { - pname = "openjfx-modular-sdk"; - - gradleProperties = '' - COMPILE_MEDIA = ${lib.boolToString withMedia} - COMPILE_WEBKIT = ${lib.boolToString withWebKit} - ${lib.optionalString withWebKit "icuRepositoryURL = file://${icuFakeRepository}"} - ''; - - preBuild = '' - swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)" - substituteInPlace build.gradle \ - --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' \ - --replace 'name: SWT_FILE_NAME' "files('$swtJar')" - ''; - - installPhase = '' - cp -r build/modular-sdk $out - ''; - - stripDebugList = [ "." ]; - - postFixup = '' - # Remove references to bootstrap. - find "$out" -name \*.so | while read lib; do - 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 ]; - - passthru.deps = deps; - - # Uses a lot of RAM, OOMs otherwise - requiredSystemFeatures = [ "big-parallel" ]; - - meta = with lib; { - homepage = "http://openjdk.java.net/projects/openjfx/"; - license = licenses.gpl2; - description = "Next-generation Java client toolkit"; - maintainers = with maintainers; [ abbradar ]; - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/development/compilers/openjdk/openjfx/15.nix b/pkgs/development/compilers/openjdk/openjfx/15.nix deleted file mode 100644 index 77c8e4678d6c..000000000000 --- a/pkgs/development/compilers/openjdk/openjfx/15.nix +++ /dev/null @@ -1,129 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, writeText, openjdk11_headless, gradle_6 -, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib -, ffmpeg_4-headless, python3, ruby -, withMedia ? true -, withWebKit ? false -}: - -let - major = "15"; - update = ".0.1"; - build = "+1"; - repover = "${major}${update}${build}"; - gradle_ = (gradle_6.override { - java = openjdk11_headless; - }); - - makePackage = args: stdenv.mkDerivation ({ - version = "${major}${update}${build}"; - - src = fetchFromGitHub { - owner = "openjdk"; - repo = "jfx"; - rev = repover; - sha256 = "019glq8rhn6amy3n5jc17vi2wpf1pxpmmywvyz1ga8n09w7xscq1"; - }; - - buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4-headless ]; - nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ]; - - dontUseCmakeConfigure = true; - - config = writeText "gradle.properties" ('' - CONF = Release - JDK_HOME = ${openjdk11_headless.home} - '' + args.gradleProperties or ""); - - env.NIX_CFLAGS_COMPILE = toString [ - #avoids errors about deprecation of GTypeDebugFlags, GTimeVal, etc. - "-DGLIB_DISABLE_DEPRECATION_WARNINGS" - - # 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" - ]; - - buildPhase = '' - runHook preBuild - - export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES - export GRADLE_USER_HOME=$(mktemp -d) - ln -s $config gradle.properties - export NIX_CFLAGS_COMPILE="$(pkg-config --cflags glib-2.0) $NIX_CFLAGS_COMPILE" - gradle --no-daemon $gradleFlags sdk - - runHook postBuild - ''; - } // args); - - # Fake build to pre-download deps into fixed-output derivation. - # We run nearly full build because I see no other way to download everything that's needed. - # Anyone who knows a better way? - deps = makePackage { - pname = "openjfx-deps"; - - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME -type f -regex '.*/modules.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ - | sh - rm -rf $out/tmp - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "sha256-fGLTMM9s/Vn7eMzn6OQR3tL0cGbAYc7c4J4/aW3JvkI="; - }; - -in makePackage { - pname = "openjfx-modular-sdk"; - - gradleProperties = '' - COMPILE_MEDIA = ${lib.boolToString withMedia} - COMPILE_WEBKIT = ${lib.boolToString withWebKit} - ''; - - preBuild = '' - swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)" - substituteInPlace build.gradle \ - --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' \ - --replace 'name: SWT_FILE_NAME' "files('$swtJar')" - ''; - - installPhase = '' - 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 - env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS -fcommon"; - - stripDebugList = [ "." ]; - - postFixup = '' - # Remove references to bootstrap. - export openjdkOutPath='${openjdk11_headless.outPath}' - find "$out" -name \*.so | while read lib; do - new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')" - patchelf --set-rpath "$new_refs" "$lib" - done - ''; - - disallowedReferences = [ openjdk11_headless ]; - - passthru.deps = deps; - - meta = with lib; { - homepage = "http://openjdk.java.net/projects/openjfx/"; - license = licenses.gpl2; - description = "Next-generation Java client toolkit"; - maintainers = with maintainers; [ abbradar ]; - knownVulnerabilities = [ - "This OpenJFX version has reached its end of life." - ]; - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/development/compilers/openjdk/openjfx/17.nix b/pkgs/development/compilers/openjdk/openjfx/17.nix deleted file mode 100644 index 00fa6af725e5..000000000000 --- a/pkgs/development/compilers/openjdk/openjfx/17.nix +++ /dev/null @@ -1,128 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, writeText, openjdk17_headless, gradle_7 -, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib -, ffmpeg_4-headless, python3, ruby, fetchurl, runCommand -, withMedia ? true -, withWebKit ? false -}: - -let - major = "17"; - update = ".0.11"; - build = "-ga"; - repover = "${major}${update}${build}"; - gradle_ = (gradle_7.override { - java = openjdk17_headless; - }); - - icuVersionWithSep = s: "71${s}1"; - icuPath = "download/release-${icuVersionWithSep "-"}/icu4c-${icuVersionWithSep "_"}-data-bin-l.zip"; - icuData = fetchurl { - url = "https://github.com/unicode-org/icu/releases/${icuPath}"; - hash = "sha256-pVWIy0BkICsthA5mxhR9SJQHleMNnaEcGl/AaLi5qZM="; - }; - icuFakeRepository = runCommand "icu-data-repository" {} '' - install -Dm644 ${icuData} $out/${icuPath} - ''; - - makePackage = args: stdenv.mkDerivation ({ - version = "${major}${update}${build}"; - - src = fetchFromGitHub { - owner = "openjdk"; - repo = "jfx${major}u"; - rev = repover; - sha256 = "sha256-WV8NHlYlt7buGbirLSorLnS2TnyBD17zUquFfwSL3xE="; - }; - - buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4-headless ]; - nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ]; - - dontUseCmakeConfigure = true; - - postPatch = '' - # Add missing includes for gcc-13 for webkit build: - sed -e '1i #include <cstdio>' \ - -i modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp \ - modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/IsoSharedPageInlines.h - ''; - - config = writeText "gradle.properties" ('' - CONF = Release - JDK_HOME = ${openjdk17_headless.home} - '' + args.gradleProperties or ""); - - buildPhase = '' - runHook preBuild - - export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES - export GRADLE_USER_HOME=$(mktemp -d) - ln -s $config gradle.properties - export NIX_CFLAGS_COMPILE="$(pkg-config --cflags glib-2.0) $NIX_CFLAGS_COMPILE" - gradle --no-daemon --console=plain $gradleFlags sdk - - runHook postBuild - ''; - } // args); - - # Fake build to pre-download deps into fixed-output derivation. - # We run nearly full build because I see no other way to download everything that's needed. - # Anyone who knows a better way? - deps = makePackage { - pname = "openjfx-deps"; - - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME -type f -regex '.*/modules.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ - | sh - rm -rf $out/tmp - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "sha256-dV7/U5GpFxhI13smZ587C6cVE4FRNPY0zexZkYK4Yqo="; - }; - -in makePackage { - pname = "openjfx-modular-sdk"; - - gradleProperties = '' - COMPILE_MEDIA = ${lib.boolToString withMedia} - COMPILE_WEBKIT = ${lib.boolToString withWebKit} - ${lib.optionalString withWebKit "icuRepositoryURL = file://${icuFakeRepository}"} - ''; - - preBuild = '' - swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)" - substituteInPlace build.gradle \ - --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' \ - --replace 'name: SWT_FILE_NAME' "files('$swtJar')" - ''; - - installPhase = '' - cp -r build/modular-sdk $out - ''; - - stripDebugList = [ "." ]; - - postFixup = '' - # Remove references to bootstrap. - export openjdkOutPath='${openjdk17_headless.outPath}' - find "$out" -name \*.so | while read lib; do - new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')" - patchelf --set-rpath "$new_refs" "$lib" - done - ''; - - disallowedReferences = [ openjdk17_headless ]; - - passthru.deps = deps; - - meta = with lib; { - homepage = "http://openjdk.java.net/projects/openjfx/"; - license = licenses.gpl2; - description = "Next-generation Java client toolkit"; - maintainers = with maintainers; [ abbradar ]; - platforms = platforms.unix; - }; -} diff --git a/pkgs/development/compilers/openjdk/openjfx/19.nix b/pkgs/development/compilers/openjdk/openjfx/19.nix deleted file mode 100644 index 38720efaba54..000000000000 --- a/pkgs/development/compilers/openjdk/openjfx/19.nix +++ /dev/null @@ -1,148 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, fetchpatch, writeText, openjdk17_headless -, openjdk19_headless, gradle_7, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst -, libXxf86vm, glib, alsa-lib, ffmpeg_4, python3, ruby, fetchurl, runCommand -, withMedia ? true -, withWebKit ? false -}: - -let - major = "19"; - update = ".0.2.1"; - build = "+1"; - repover = "${major}${update}${build}"; - gradle_ = (gradle_7.override { - # note: gradle does not yet support running on 19 - java = openjdk17_headless; - }); - - icuVersionWithSep = s: "68${s}2"; - icuPath = "download/release-${icuVersionWithSep "-"}/icu4c-${icuVersionWithSep "."}-data-bin-l.zip"; - icuData = fetchurl { - url = "https://github.com/unicode-org/icu/releases/${icuPath}"; - hash = "sha256-ieQCLBTNrskuf8j3IUQS3QLIAQzLom/O58muMP363Lw="; - }; - icuFakeRepository = runCommand "icu-data-repository" {} '' - install -Dm644 ${icuData} $out/${icuPath} - ''; - - makePackage = args: stdenv.mkDerivation ({ - version = "${major}${update}${build}"; - - src = fetchFromGitHub { - owner = "openjdk"; - repo = "jfx"; - rev = repover; - hash = "sha256-A08GhCGpzWlUG1+f6mcjvkJmMNaOReacQKPEmNpUvLs="; - }; - - patches = [ - # 8295962: Reference to State in Task.java is ambiguous when building with JDK 19 - (fetchpatch { - url = "https://github.com/openjdk/jfx/pull/933/commits/cfaee2a52350eff39dd4352484c892716076d3de.patch"; - hash = "sha256-hzJMenhvtmHs/6BJj8GfaLp14myV8VCXCLLC8n32yEw="; - }) - # ditto - (fetchpatch { - url = "https://github.com/openjdk/jfx/pull/933/commits/bd46ce12df0a93a56fe0d58d3653d08e58409b7f.patch"; - hash = "sha256-o9908uw9vYvULmAh/lbfyHhgxz6jpgPq2fcAltWsYoU="; - }) - ]; - - postPatch = '' - # Add missing includes for gcc-13 for webkit build: - sed -e '1i #include <cstdio>' \ - -i modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp \ - modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/IsoSharedPageInlines.h - ''; - - buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4 ]; - nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ]; - - dontUseCmakeConfigure = true; - - config = writeText "gradle.properties" ('' - CONF = Release - JDK_HOME = ${openjdk19_headless.home} - '' + args.gradleProperties or ""); - - buildPhase = '' - runHook preBuild - - export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES - export GRADLE_USER_HOME=$(mktemp -d) - ln -s $config gradle.properties - export NIX_CFLAGS_COMPILE="$(pkg-config --cflags glib-2.0) $NIX_CFLAGS_COMPILE" - gradle --no-daemon --console=plain $gradleFlags sdk - - runHook postBuild - ''; - } // args); - - # Fake build to pre-download deps into fixed-output derivation. - # We run nearly full build because I see no other way to download everything that's needed. - # Anyone who knows a better way? - deps = makePackage { - pname = "openjfx-deps"; - - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME -type f -regex '.*/modules.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ - | sh - rm -rf $out/tmp - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - # suspiciously the same as for openjfx 17 ... - # could they really not have changed any of their dependencies? - # or did we miss changing another upstream hash when copy-pasting? - outputHash = "sha256-dV7/U5GpFxhI13smZ587C6cVE4FRNPY0zexZkYK4Yqo="; - }; - -in makePackage { - pname = "openjfx-modular-sdk"; - - gradleProperties = '' - COMPILE_MEDIA = ${lib.boolToString withMedia} - COMPILE_WEBKIT = ${lib.boolToString withWebKit} - ${lib.optionalString withWebKit "icuRepositoryURL = file://${icuFakeRepository}"} - ''; - - preBuild = '' - swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)" - substituteInPlace build.gradle \ - --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' \ - --replace 'name: SWT_FILE_NAME' "files('$swtJar')" - ''; - - installPhase = '' - cp -r build/modular-sdk $out - ''; - - stripDebugList = [ "." ]; - - postFixup = '' - # Remove references to bootstrap. - export openjdkOutPath='${openjdk19_headless.outPath}' - find "$out" -name \*.so | while read lib; do - new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')" - patchelf --set-rpath "$new_refs" "$lib" - done - ''; - - disallowedReferences = [ openjdk17_headless openjdk19_headless ]; - - passthru.deps = deps; - - meta = with lib; { - homepage = "https://openjdk.org/projects/openjfx/"; - license = licenses.gpl2Classpath; - description = "Next-generation Java client toolkit"; - maintainers = with maintainers; [ abbradar ]; - platforms = platforms.unix; - knownVulnerabilities = [ - "This OpenJFX version has reached its end of life." - ]; - }; -} diff --git a/pkgs/development/compilers/openjdk/openjfx/20.nix b/pkgs/development/compilers/openjdk/openjfx/20.nix deleted file mode 100644 index 0aa7b262e834..000000000000 --- a/pkgs/development/compilers/openjdk/openjfx/20.nix +++ /dev/null @@ -1,135 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, writeText, openjdk17_headless -, openjdk20_headless, gradle_7, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst -, libXxf86vm, glib, alsa-lib, ffmpeg_4, python3, ruby, fetchurl, runCommand -, withMedia ? true -, withWebKit ? false -}: - -let - major = "20"; - update = ".0.2"; - build = "-ga"; - repover = "${major}${update}${build}"; - gradle_ = (gradle_7.override { - # note: gradle does not yet support running on 19 - java = openjdk17_headless; - }); - - icuVersionWithSep = s: "71${s}1"; - icuPath = "download/release-${icuVersionWithSep "-"}/icu4c-${icuVersionWithSep "_"}-data-bin-l.zip"; - icuData = fetchurl { - url = "https://github.com/unicode-org/icu/releases/${icuPath}"; - hash = "sha256-pVWIy0BkICsthA5mxhR9SJQHleMNnaEcGl/AaLi5qZM="; - }; - icuFakeRepository = runCommand "icu-data-repository" {} '' - install -Dm644 ${icuData} $out/${icuPath} - ''; - - makePackage = args: stdenv.mkDerivation ({ - version = "${major}${update}${build}"; - - src = fetchFromGitHub { - owner = "openjdk"; - repo = "jfx20u"; - rev = repover; - hash = "sha256-3Hhz4i8fPU2yowb4roylCXzuO9HkW7ZWF9TMA3HIH9o="; - }; - - buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4 ]; - nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ]; - - dontUseCmakeConfigure = true; - - postPatch = '' - # Add missing includes for gcc-13 for webkit build: - sed -e '1i #include <cstdio>' \ - -i modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp \ - modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/IsoSharedPageInlines.h - ''; - - config = writeText "gradle.properties" ('' - CONF = Release - JDK_HOME = ${openjdk20_headless.home} - '' + args.gradleProperties or ""); - - buildPhase = '' - runHook preBuild - - export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES - export GRADLE_USER_HOME=$(mktemp -d) - ln -s $config gradle.properties - export NIX_CFLAGS_COMPILE="$(pkg-config --cflags glib-2.0) $NIX_CFLAGS_COMPILE" - gradle --no-daemon --console=plain $gradleFlags sdk - - runHook postBuild - ''; - } // args); - - # Fake build to pre-download deps into fixed-output derivation. - # We run nearly full build because I see no other way to download everything that's needed. - # Anyone who knows a better way? - deps = makePackage { - pname = "openjfx-deps"; - - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME -type f -regex '.*/modules.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ - | sh - rm -rf $out/tmp - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - # suspiciously the same as for openjfx 17 ... - # could they really not have changed any of their dependencies? - # or did we miss changing another upstream hash when copy-pasting? - outputHash = "sha256-dV7/U5GpFxhI13smZ587C6cVE4FRNPY0zexZkYK4Yqo="; - }; - -in makePackage { - pname = "openjfx-modular-sdk"; - - gradleProperties = '' - COMPILE_MEDIA = ${lib.boolToString withMedia} - COMPILE_WEBKIT = ${lib.boolToString withWebKit} - ${lib.optionalString withWebKit "icuRepositoryURL = file://${icuFakeRepository}"} - ''; - - preBuild = '' - swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)" - substituteInPlace build.gradle \ - --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' \ - --replace 'name: SWT_FILE_NAME' "files('$swtJar')" - ''; - - installPhase = '' - cp -r build/modular-sdk $out - ''; - - stripDebugList = [ "." ]; - - postFixup = '' - # Remove references to bootstrap. - export openjdkOutPath='${openjdk20_headless.outPath}' - find "$out" -name \*.so | while read lib; do - new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')" - patchelf --set-rpath "$new_refs" "$lib" - done - ''; - - disallowedReferences = [ openjdk17_headless openjdk20_headless ]; - - passthru.deps = deps; - - meta = with lib; { - homepage = "https://openjdk.org/projects/openjfx/"; - license = licenses.gpl2Classpath; - description = "Next-generation Java client toolkit"; - maintainers = with maintainers; [ abbradar ]; - platforms = platforms.unix; - knownVulnerabilities = [ - "This OpenJFX version has reached its end of life." - ]; - }; -} diff --git a/pkgs/development/compilers/openjdk/openjfx/21.nix b/pkgs/development/compilers/openjdk/openjfx/21.nix deleted file mode 100644 index d4092a99f363..000000000000 --- a/pkgs/development/compilers/openjdk/openjfx/21.nix +++ /dev/null @@ -1,132 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, writeText, openjdk17_headless -, openjdk21_headless, gradle_7, pkg-config, perl, cmake, gperf, gtk2, gtk3, libXtst -, libXxf86vm, glib, alsa-lib, ffmpeg_4, python3, ruby, fetchurl, runCommand -, withMedia ? true -, withWebKit ? false -}: - -let - major = "21"; - update = ""; - build = "-ga"; - repover = "${major}${update}${build}"; - gradle_ = (gradle_7.override { - # note: gradle does not yet support running on 19 - java = openjdk17_headless; - }); - - icuVersionWithSep = s: "73${s}1"; - icuPath = "download/release-${icuVersionWithSep "-"}/icu4c-${icuVersionWithSep "_"}-data-bin-l.zip"; - icuData = fetchurl { - url = "https://github.com/unicode-org/icu/releases/${icuPath}"; - hash = "sha256-QDgpjuAqDDiRcYXvj/Tr3pyLVSx3f9A+TfbGtLGCXiA="; - }; - icuFakeRepository = runCommand "icu-data-repository" {} '' - install -Dm644 ${icuData} $out/${icuPath} - ''; - - makePackage = args: stdenv.mkDerivation ({ - version = "${major}${update}${build}"; - - src = fetchFromGitHub { - owner = "openjdk"; - repo = "jfx"; - rev = repover; - hash = "sha256-deNAGfnA6gwcAa64l0AWdkX+vJd3ZOfIgAifSl+/m+s="; - }; - - buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4 ]; - nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python3 ruby ]; - - dontUseCmakeConfigure = true; - - postPatch = '' - # Add missing includes for gcc-13 for webkit build: - sed -e '1i #include <cstdio>' \ - -i modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp \ - modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/IsoSharedPageInlines.h - ''; - - config = writeText "gradle.properties" ('' - CONF = Release - JDK_HOME = ${openjdk21_headless.home} - '' + args.gradleProperties or ""); - - buildPhase = '' - runHook preBuild - - export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES - export GRADLE_USER_HOME=$(mktemp -d) - ln -s $config gradle.properties - export NIX_CFLAGS_COMPILE="$(pkg-config --cflags glib-2.0) $NIX_CFLAGS_COMPILE" - gradle --no-daemon --console=plain $gradleFlags sdk - - runHook postBuild - ''; - } // args); - - # Fake build to pre-download deps into fixed-output derivation. - # We run nearly full build because I see no other way to download everything that's needed. - # Anyone who knows a better way? - deps = makePackage { - pname = "openjfx-deps"; - - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME -type f -regex '.*/modules.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ - | sh - rm -rf $out/tmp - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - # suspiciously the same as for openjfx 17 ... - # could they really not have changed any of their dependencies? - # or did we miss changing another upstream hash when copy-pasting? - outputHash = "sha256-dV7/U5GpFxhI13smZ587C6cVE4FRNPY0zexZkYK4Yqo="; - }; - -in makePackage { - pname = "openjfx-modular-sdk"; - - gradleProperties = '' - COMPILE_MEDIA = ${lib.boolToString withMedia} - COMPILE_WEBKIT = ${lib.boolToString withWebKit} - ${lib.optionalString withWebKit "icuRepositoryURL = file://${icuFakeRepository}"} - ''; - - preBuild = '' - swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)" - substituteInPlace build.gradle \ - --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' \ - --replace 'name: SWT_FILE_NAME' "files('$swtJar')" - ''; - - installPhase = '' - cp -r build/modular-sdk $out - ''; - - stripDebugList = [ "." ]; - - postFixup = '' - # Remove references to bootstrap. - export openjdkOutPath='${openjdk21_headless.outPath}' - find "$out" -name \*.so | while read lib; do - new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')" - patchelf --set-rpath "$new_refs" "$lib" - done - ''; - - disallowedReferences = [ openjdk17_headless openjdk21_headless ]; - - passthru.deps = deps; - - meta = with lib; { - homepage = "https://openjdk.org/projects/openjfx/"; - license = licenses.gpl2Classpath; - description = "Next-generation Java client toolkit"; - maintainers = with maintainers; [ abbradar ]; - platforms = platforms.unix; - }; -} diff --git a/pkgs/development/compilers/openjdk/openjfx/22.nix b/pkgs/development/compilers/openjdk/openjfx/22.nix deleted file mode 100644 index c34ff0466895..000000000000 --- a/pkgs/development/compilers/openjdk/openjfx/22.nix +++ /dev/null @@ -1,137 +0,0 @@ -{ stdenv -, lib -, fetchFromGitHub -, fetchurl -, runCommand -, writeText -, openjdk21_headless -, gradle -, pkg-config -, perl -, cmake -, gperf -, gtk2 -, gtk3 -, libXtst -, libXxf86vm -, glib -, alsa-lib -, ffmpeg_4 -, python3 -, ruby -, withMedia ? true -, withWebKit ? false -}: - -let - major = "22"; - update = ".0.1"; - build = "-ga"; - repover = "${major}${update}${build}"; - - icuVersionWithSep = s: "73${s}1"; - icuPath = "download/release-${icuVersionWithSep "-"}/icu4c-${icuVersionWithSep "_"}-data-bin-l.zip"; - icuData = fetchurl { - url = "https://github.com/unicode-org/icu/releases/${icuPath}"; - hash = "sha256-QDgpjuAqDDiRcYXvj/Tr3pyLVSx3f9A+TfbGtLGCXiA="; - }; - icuFakeRepository = runCommand "icu-data-repository" {} '' - install -Dm644 ${icuData} $out/${icuPath} - ''; - - makePackage = args: stdenv.mkDerivation ({ - version = "${major}${update}${build}"; - - src = fetchFromGitHub { - owner = "openjdk"; - repo = "jfx22u"; - rev = repover; - hash = "sha256-VoEufSO+LciUCvoAM86MG1iMjCA3FSb60Ik4OP2Rk/Q="; - }; - - buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg_4 ]; - nativeBuildInputs = [ gradle perl pkg-config cmake gperf python3 ruby ]; - - dontUseCmakeConfigure = true; - - config = writeText "gradle.properties" ('' - CONF = Release - JDK_HOME = ${openjdk21_headless.home} - '' + args.gradleProperties or ""); - - buildPhase = '' - runHook preBuild - - export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES - export GRADLE_USER_HOME=$(mktemp -d) - ln -s $config gradle.properties - export NIX_CFLAGS_COMPILE="$(pkg-config --cflags glib-2.0) $NIX_CFLAGS_COMPILE" - gradle --no-daemon --console=plain $gradleFlags sdk - - runHook postBuild - ''; - } // args); - - # Fake build to pre-download deps into fixed-output derivation. - # We run nearly full build because I see no other way to download everything that's needed. - # Anyone who knows a better way? - deps = makePackage { - pname = "openjfx-deps"; - - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME -type f -regex '.*/modules.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ - | sh - rm -rf $out/tmp - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "sha256-2I7LvYcudlB4DKJ/wEiTjY6nICUxUY52euosUqOA+Bs="; - }; - -in -makePackage { - pname = "openjfx-modular-sdk"; - - gradleProperties = '' - COMPILE_MEDIA = ${lib.boolToString withMedia} - COMPILE_WEBKIT = ${lib.boolToString withWebKit} - ${lib.optionalString withWebKit "icuRepositoryURL = file://${icuFakeRepository}"} - ''; - - preBuild = '' - swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)" - substituteInPlace build.gradle \ - --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' \ - --replace 'name: SWT_FILE_NAME' "files('$swtJar')" - ''; - - installPhase = '' - cp -r build/modular-sdk $out - ''; - - stripDebugList = [ "." ]; - - postFixup = '' - # Remove references to bootstrap. - export openjdkOutPath='${openjdk21_headless.outPath}' - find "$out" -name \*.so | while read lib; do - new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')" - patchelf --set-rpath "$new_refs" "$lib" - done - ''; - - disallowedReferences = [ openjdk21_headless openjdk21_headless ]; - - passthru.deps = deps; - - meta = with lib; { - homepage = "https://openjdk.org/projects/openjfx/"; - license = licenses.gpl2Classpath; - description = "Next-generation Java client toolkit"; - maintainers = with maintainers; [ abbradar ]; - platforms = platforms.unix; - }; -} |