From 0f7e7b687eebdb9d4a482f1594290cf9e9e58d69 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 7 Oct 2024 09:22:21 +0300 Subject: [PATCH 01/11] dbeaver-bin: don't depend on swt (not needed at all) --- pkgs/by-name/db/dbeaver-bin/package.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/by-name/db/dbeaver-bin/package.nix b/pkgs/by-name/db/dbeaver-bin/package.nix index d8f5a5362c36..ef29c8a67548 100644 --- a/pkgs/by-name/db/dbeaver-bin/package.nix +++ b/pkgs/by-name/db/dbeaver-bin/package.nix @@ -9,7 +9,6 @@ autoPatchelfHook, wrapGAppsHook3, gtk3, - swt, glib, webkitgtk_4_0, glib-networking, @@ -65,11 +64,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { makeWrapper $out/opt/dbeaver/dbeaver $out/bin/dbeaver \ --prefix PATH : "${openjdk17}/bin" \ --set JAVA_HOME "${openjdk17.home}" \ - --prefix CLASSPATH : "$out/dbeaver/plugins/*:${swt}/jars/swt.jar" \ --prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \ --prefix LD_LIBRARY_PATH : "$out/lib:${ lib.makeLibraryPath [ - swt gtk3 glib webkitgtk_4_0 From 7c16395c9f1ce5b300a8a80625bc5d98b7102f99 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 7 Oct 2024 09:23:31 +0300 Subject: [PATCH 02/11] portfolio: don't depend on swt (not needed at all) --- pkgs/by-name/po/portfolio/package.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/by-name/po/portfolio/package.nix b/pkgs/by-name/po/portfolio/package.nix index c73b6985f341..6d8d826007d2 100644 --- a/pkgs/by-name/po/portfolio/package.nix +++ b/pkgs/by-name/po/portfolio/package.nix @@ -9,7 +9,6 @@ makeDesktopItem, openjdk17, stdenvNoCC, - swt, webkitgtk_4_0, wrapGAppsHook3, gitUpdater, @@ -29,7 +28,6 @@ let glib-networking gtk3 libsecret - swt webkitgtk_4_0 ]; in @@ -56,7 +54,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { makeWrapper $out/portfolio/PortfolioPerformance $out/bin/portfolio \ --prefix LD_LIBRARY_PATH : "${runtimeLibs}" \ - --prefix CLASSPATH : "${swt}/jars/swt.jar" \ --prefix PATH : ${openjdk17}/bin # Create desktop item From 271e05bbfb2f3d08e548f4d5efc24a76ff705807 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 7 Oct 2024 09:28:00 +0300 Subject: [PATCH 03/11] ipscan: mark as broken (doesn't really launch) --- pkgs/tools/security/ipscan/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/security/ipscan/default.nix b/pkgs/tools/security/ipscan/default.nix index f61944fe63ea..149cd322219b 100644 --- a/pkgs/tools/security/ipscan/default.nix +++ b/pkgs/tools/security/ipscan/default.nix @@ -51,5 +51,7 @@ stdenv.mkDerivation rec { license = licenses.gpl2Only; platforms = [ "x86_64-linux" ]; maintainers = with maintainers; [ kylesferrazza totoroot ]; + # Very similar issue to hdfview, see: https://github.com/NixOS/nixpkgs/issues/340048 + broken = true; }; } From c582a1e5e650173bc3abb7b19e6af90c61cbb578 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 7 Oct 2024 09:40:26 +0300 Subject: [PATCH 04/11] vuze: mark as broken --- pkgs/applications/networking/p2p/vuze/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/networking/p2p/vuze/default.nix b/pkgs/applications/networking/p2p/vuze/default.nix index e24601757685..0d3ee40236b5 100644 --- a/pkgs/applications/networking/p2p/vuze/default.nix +++ b/pkgs/applications/networking/p2p/vuze/default.nix @@ -26,5 +26,8 @@ stdenv.mkDerivation rec { license = licenses.unfree; platforms = platforms.all; maintainers = [ ]; + # Doesn't launch, gives java related incompatibilities errors. Probably + # related to swt. Same error happens with swt_jdk8 + broken = true; }; } From 729a27a947a50e38589d520c2604c2d0191db7a9 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 7 Oct 2024 10:04:30 +0300 Subject: [PATCH 05/11] tuxguitar: nixfmt & don't use 'with lib;' in meta --- .../editors/music/tuxguitar/default.nix | 63 ++++++++++++++----- 1 file changed, 48 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/editors/music/tuxguitar/default.nix b/pkgs/applications/editors/music/tuxguitar/default.nix index a602de8a37b7..7c853967218f 100644 --- a/pkgs/applications/editors/music/tuxguitar/default.nix +++ b/pkgs/applications/editors/music/tuxguitar/default.nix @@ -1,11 +1,32 @@ -{ lib, stdenv, fetchurl, swt, jre, makeWrapper, alsa-lib, jack2, fluidsynth, libpulseaudio, nixosTests }: +{ + lib, + stdenv, + fetchurl, + swt, + jre, + makeWrapper, + alsa-lib, + jack2, + fluidsynth, + libpulseaudio, + nixosTests, +}: -let metadata = assert stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"; - if stdenv.hostPlatform.system == "i686-linux" then - { arch = "x86"; sha256 = "sha256-k4FQrt72VNb5FdYMzxskcVhKlvx8MZelUlLCItxDB7c="; } - else - { arch = "x86_64"; sha256 = "sha256-mj5wVQlY2xFzdulvMdb5Qb5HGwr7RElzIkpOLjaAfGA="; }; -in stdenv.mkDerivation rec { +let + metadata = + assert stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"; + if stdenv.hostPlatform.system == "i686-linux" then + { + arch = "x86"; + sha256 = "sha256-k4FQrt72VNb5FdYMzxskcVhKlvx8MZelUlLCItxDB7c="; + } + else + { + arch = "x86_64"; + sha256 = "sha256-mj5wVQlY2xFzdulvMdb5Qb5HGwr7RElzIkpOLjaAfGA="; + }; +in +stdenv.mkDerivation rec { version = "1.5.5"; pname = "tuxguitar"; @@ -14,7 +35,9 @@ in stdenv.mkDerivation rec { sha256 = metadata.sha256; }; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ + makeWrapper + ]; installPhase = '' mkdir -p $out/bin @@ -27,22 +50,32 @@ in stdenv.mkDerivation rec { wrapProgram $out/bin/tuxguitar \ --set JAVA "${jre}/bin/java" \ - --prefix LD_LIBRARY_PATH : "$out/lib/:${lib.makeLibraryPath [ swt alsa-lib jack2 fluidsynth libpulseaudio ]}" \ + --prefix LD_LIBRARY_PATH : "$out/lib/:${ + lib.makeLibraryPath [ + swt + alsa-lib + jack2 + fluidsynth + libpulseaudio + ] + }" \ --prefix CLASSPATH : "${swt}/jars/swt.jar:$out/lib/tuxguitar.jar:$out/lib/itext.jar" ''; - passthru.tests = { inherit (nixosTests) tuxguitar; }; + passthru.tests = { + inherit (nixosTests) tuxguitar; + }; - meta = with lib; { + meta = { description = "Multitrack guitar tablature editor"; longDescription = '' TuxGuitar is a multitrack guitar tablature editor and player written in Java-SWT. It can open GuitarPro, PowerTab and TablEdit files. ''; homepage = "http://www.tuxguitar.com.ar/"; - sourceProvenance = with sourceTypes; [ binaryBytecode ]; - license = licenses.lgpl2; - maintainers = [ maintainers.ardumont ]; - platforms = platforms.linux; + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; + license = lib.licenses.lgpl2; + maintainers = with lib.maintainers; [ ardumont ]; + platforms = lib.platforms.linux; }; } From e72eb22590baf1d1cfae0d8ed7b721242eb3e9e7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 7 Oct 2024 10:06:40 +0300 Subject: [PATCH 06/11] tuxguitar: use finalAttrs pattern --- pkgs/applications/editors/music/tuxguitar/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/music/tuxguitar/default.nix b/pkgs/applications/editors/music/tuxguitar/default.nix index 7c853967218f..5dc2f9c0a6cd 100644 --- a/pkgs/applications/editors/music/tuxguitar/default.nix +++ b/pkgs/applications/editors/music/tuxguitar/default.nix @@ -26,12 +26,12 @@ let sha256 = "sha256-mj5wVQlY2xFzdulvMdb5Qb5HGwr7RElzIkpOLjaAfGA="; }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { version = "1.5.5"; pname = "tuxguitar"; src = fetchurl { - url = "mirror://sourceforge/${pname}/${pname}-${version}-linux-${metadata.arch}.tar.gz"; + url = "mirror://sourceforge/tuxguitar/tuxguitar-${finalAttrs.version}-linux-${metadata.arch}.tar.gz"; sha256 = metadata.sha256; }; @@ -78,4 +78,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ ardumont ]; platforms = lib.platforms.linux; }; -} +}) From dd12b437a6f6fd2b7d778ba7aad6c37dd841dbb6 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 7 Oct 2024 10:07:33 +0300 Subject: [PATCH 07/11] tuxguitar: rename passthru nixos test attribute --- pkgs/applications/editors/music/tuxguitar/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/music/tuxguitar/default.nix b/pkgs/applications/editors/music/tuxguitar/default.nix index 5dc2f9c0a6cd..aec5f0999dd9 100644 --- a/pkgs/applications/editors/music/tuxguitar/default.nix +++ b/pkgs/applications/editors/music/tuxguitar/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru.tests = { - inherit (nixosTests) tuxguitar; + nixos = nixosTests.tuxguitar; }; meta = { From b76ff9137f97509dff1ae18271ac6c8fa4697e80 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 6 Oct 2024 22:36:21 +0300 Subject: [PATCH 08/11] swt: 4.5 -> 4.33 Fixes #219771. Previous attempt: #75609 --- pkgs/by-name/sw/swt/awt-libs.patch | 8 --- pkgs/by-name/sw/swt/gtk-libs.patch | 14 ---- pkgs/by-name/sw/swt/package.nix | 105 +++++++++-------------------- 3 files changed, 30 insertions(+), 97 deletions(-) delete mode 100644 pkgs/by-name/sw/swt/awt-libs.patch delete mode 100644 pkgs/by-name/sw/swt/gtk-libs.patch diff --git a/pkgs/by-name/sw/swt/awt-libs.patch b/pkgs/by-name/sw/swt/awt-libs.patch deleted file mode 100644 index 6c3ff53b7983..000000000000 --- a/pkgs/by-name/sw/swt/awt-libs.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/make_linux.mak -+++ b/make_linux.mak -@@ -63,4 +63,4 @@ - - AWT_LFLAGS = -shared ${SWT_LFLAGS} --AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt -+AWT_LIBS = `pkg-config --libs x11` -L$(AWT_LIB_PATH) -ljawt - diff --git a/pkgs/by-name/sw/swt/gtk-libs.patch b/pkgs/by-name/sw/swt/gtk-libs.patch deleted file mode 100644 index cd13082b5df7..000000000000 --- a/pkgs/by-name/sw/swt/gtk-libs.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/make_linux.mak -+++ b/make_linux.mak -@@ -53,9 +53,4 @@ - --# Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0) --GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)` -+GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gthread-2.0 gtk+-unix-print-$(GTK_VERSION) x11 xtst` -+GTKLIBS = `pkg-config --libs gtk+-$(GTK_VERSION) gthread-2.0 gtk+-unix-print-$(GTK_VERSION) x11 xtst` --ifeq ($(GTK_VERSION), 3.0) --GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-3 -lgdk-3 -lcairo -lgthread-2.0 -lXtst --else --GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-x11-$(GTK_VERSION) -lgthread-2.0 -lXtst --endif - diff --git a/pkgs/by-name/sw/swt/package.nix b/pkgs/by-name/sw/swt/package.nix index 7f386779d47d..04d880dc3368 100644 --- a/pkgs/by-name/sw/swt/package.nix +++ b/pkgs/by-name/sw/swt/package.nix @@ -1,13 +1,9 @@ { - atk, fetchzip, - gtk2, + gtk3, jdk, lib, - libGL, libGLU, - libXt, - libXtst, pkg-config, stdenv, stripJavaArchivesHook, @@ -15,18 +11,16 @@ stdenv.mkDerivation (finalAttrs: { pname = "swt"; - version = "4.5"; - fullVersion = "${finalAttrs.version}-201506032000"; + version = "4.33"; + fullVersion = "${finalAttrs.version}-202409030240"; hardeningDisable = [ "format" ]; passthru.srcMetadataByPlatform = { x86_64-linux.platform = "gtk-linux-x86_64"; - x86_64-linux.hash = "sha256-JhzRCrVzsM2NBf65l6CDZdgchlbECHGUg0J0bQVT2Z0="; - i686-linux.platform = "gtk-linux-x86"; - i686-linux.hash = "sha256-C7H1CUFkl7GPpqDFSzYnlLWa1XcawI2hbtsn9fIJio0="; + x86_64-linux.hash = "sha256-0OUr+jpwTx5/eoA6Uo2E9/SBAtf+IMMiSVRhOfaWFhE="; x86_64-darwin.platform = "cocoa-macosx-x86_64"; - x86_64-darwin.hash = "sha256-CrSFkrlnSP2uQzRrRzv8F0lXEA7TNK9RFe2neDjtXnI="; + x86_64-darwin.hash = "sha256-n948C/YPF55WPYvub3re/wARLP1Wk+XhJiIuI0YQH5c="; }; passthru.srcMetadata = finalAttrs.passthru.srcMetadataByPlatform.${stdenv.hostPlatform.system} or null; @@ -56,84 +50,39 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ + jdk stripJavaArchivesHook pkg-config ]; buildInputs = [ - atk - gtk2 - jdk - libGL + gtk3 libGLU - libXtst - ] ++ lib.optionals (lib.hasPrefix "8u" jdk.version) [ libXt ]; - - patches = [ - ./awt-libs.patch - ./gtk-libs.patch ]; - prePatch = '' - # clear whitespace from makefiles (since we match on EOL later) - sed -i 's/ \+$//' ./*.mak + SWT_JAVA_HOME = jdk; + AWT_LIB_PATH = "${jdk}/lib/openjdk/lib"; + # Used by the makefile which is responsible for the shared objects only + OUTPUT_DIR = "${placeholder "out"}/lib"; + # GTK4 is not supported yet. Waiting for: + # https://github.com/eclipse-platform/eclipse.platform.swt/pull/1482 + makeFlags = "gtk3"; + preBuild = '' + cd library + mkdir -p ${finalAttrs.OUTPUT_DIR} ''; - postPatch = - let - makefile-sed = builtins.toFile "swt-makefile.sed" '' - # fix pkg-config invocations in CFLAGS/LIBS pairs. - # - # change: - # FOOCFLAGS = `pkg-config --cflags `foo bar` - # FOOLIBS = `pkg-config --libs-only-L foo` -lbaz - # into: - # FOOCFLAGS = `pkg-config --cflags foo bar` - # FOOLIBS = `pkg-config --libs foo bar` - # - # the latter works more consistently. - /^[A-Z0-9_]\+CFLAGS = `pkg-config --cflags [^`]\+`$/ { - N - s/${'' - ^\([A-Z0-9_]\+\)CFLAGS = `pkg-config --cflags \(.\+\)`\ - \1LIBS = `pkg-config --libs-only-L .\+$''}/${'' - \1CFLAGS = `pkg-config --cflags \2`\ - \1LIBS = `pkg-config --libs \2`''}/ - } - # fix WebKit libs not being there - s/\$(WEBKIT_LIB) \$(WEBKIT_OBJECTS)$/\0 `pkg-config --libs glib-2.0`/g - ''; - in - '' - declare -a makefiles=(./*.mak) - sed -i -f ${makefile-sed} "''${makefiles[@]}" - # assign Makefile variables eagerly & change backticks to `$(shell …)` - sed -i -e 's/ = `\([^`]\+\)`/ := $(shell \1)/' \ - -e 's/`\([^`]\+\)`/$(shell \1)/' \ - "''${makefiles[@]}" - ''; - - buildPhase = '' - runHook preBuild - - export JAVA_HOME=${jdk} - - ./build.sh - + # Build the jar + postBuild = '' + cd ../ mkdir out find org/ -name '*.java' -type f -exec javac -d out/ {} + - - runHook postBuild ''; + # The makefile doesn't have an install target, the installation of the shared + # objects is part of the `all` target. installPhase = '' runHook preInstall - if [[ -n "$prefix" ]]; then - install -d -- "$prefix" - fi - - install -Dm 644 -t "$out/lib" -- *.so - install -d -- "$out/jars" install -m 644 -t out -- version.txt (cd out && jar -c *) > "$out/jars/swt.jar" @@ -147,8 +96,14 @@ stdenv.mkDerivation (finalAttrs: { A widget toolkit for Java to access the user-interface facilities of the operating systems on which it is implemented. ''; - license = lib.licenses.epl10; + license = with lib.licenses; [ + # All of these are located in the about_files directory of the source + ijg + lgpl21 + mpl11 + mpl20 + ]; maintainers = [ ]; - platforms = lib.platforms.linux; + platforms = lib.attrNames finalAttrs.passthru.srcMetadataByPlatform; }; }) From 51475bd9d35a0f7b9cb40c7dce573996b0bbe9d7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 7 Oct 2024 10:08:49 +0300 Subject: [PATCH 09/11] tuxguitar: 1.5.5 -> 1.6.4; move to pkgs/by-name --- .../tu/tuxguitar/package.nix} | 24 +++++-------------- pkgs/top-level/all-packages.nix | 5 ---- 2 files changed, 6 insertions(+), 23 deletions(-) rename pkgs/{applications/editors/music/tuxguitar/default.nix => by-name/tu/tuxguitar/package.nix} (69%) diff --git a/pkgs/applications/editors/music/tuxguitar/default.nix b/pkgs/by-name/tu/tuxguitar/package.nix similarity index 69% rename from pkgs/applications/editors/music/tuxguitar/default.nix rename to pkgs/by-name/tu/tuxguitar/package.nix index aec5f0999dd9..d3399471a75a 100644 --- a/pkgs/applications/editors/music/tuxguitar/default.nix +++ b/pkgs/by-name/tu/tuxguitar/package.nix @@ -9,30 +9,17 @@ jack2, fluidsynth, libpulseaudio, + lilv, nixosTests, }: -let - metadata = - assert stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"; - if stdenv.hostPlatform.system == "i686-linux" then - { - arch = "x86"; - sha256 = "sha256-k4FQrt72VNb5FdYMzxskcVhKlvx8MZelUlLCItxDB7c="; - } - else - { - arch = "x86_64"; - sha256 = "sha256-mj5wVQlY2xFzdulvMdb5Qb5HGwr7RElzIkpOLjaAfGA="; - }; -in stdenv.mkDerivation (finalAttrs: { - version = "1.5.5"; + version = "1.6.4"; pname = "tuxguitar"; src = fetchurl { - url = "mirror://sourceforge/tuxguitar/tuxguitar-${finalAttrs.version}-linux-${metadata.arch}.tar.gz"; - sha256 = metadata.sha256; + url = "https://github.com/helge17/tuxguitar/releases/download/${finalAttrs.version}/tuxguitar-${finalAttrs.version}-linux-swt-amd64.tar.gz"; + hash = "sha256-FD1+7jV69E9AfTczjD6DOGD+pPlscg4o8A9ADBUM9B4="; }; nativeBuildInputs = [ @@ -57,6 +44,7 @@ stdenv.mkDerivation (finalAttrs: { jack2 fluidsynth libpulseaudio + lilv ] }" \ --prefix CLASSPATH : "${swt}/jars/swt.jar:$out/lib/tuxguitar.jar:$out/lib/itext.jar" @@ -76,6 +64,6 @@ stdenv.mkDerivation (finalAttrs: { sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; license = lib.licenses.lgpl2; maintainers = with lib.maintainers; [ ardumont ]; - platforms = lib.platforms.linux; + platforms = [ "x86_64-linux" ]; }; }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2d21ffc081ef..0bd2f1cd14aa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33078,11 +33078,6 @@ with pkgs; tuxedo-rs = callPackage ../os-specific/linux/tuxedo-rs { }; - tuxguitar = callPackage ../applications/editors/music/tuxguitar { - jre = jre8; - swt = swt_jdk8; - }; - twmn = libsForQt5.callPackage ../applications/misc/twmn { }; testssl = callPackage ../applications/networking/testssl { }; From 329e459dab229ffcade78fe2ab30a0690eddafb6 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 13 Oct 2024 21:29:07 +0300 Subject: [PATCH 10/11] swt: make it actually useful Co-Authored-By: Ben Wolsieffer --- pkgs/by-name/sw/swt/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/sw/swt/package.nix b/pkgs/by-name/sw/swt/package.nix index 04d880dc3368..b06eaa9ab08c 100644 --- a/pkgs/by-name/sw/swt/package.nix +++ b/pkgs/by-name/sw/swt/package.nix @@ -75,7 +75,9 @@ stdenv.mkDerivation (finalAttrs: { postBuild = '' cd ../ mkdir out - find org/ -name '*.java' -type f -exec javac -d out/ {} + + find org/ -name '*.java' -type f -exec javac -encoding utf8 -d out/ {} + + # Copy non Java resource files + find org/ -not -name '*.java' -not -name '*.html' -type f -exec cp {} out/{} \; ''; # The makefile doesn't have an install target, the installation of the shared From c70579b0a564176e2aa9d9e042d13f6d9f8bd023 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 14 Oct 2024 12:06:40 +0300 Subject: [PATCH 11/11] dataexplorer: make it launch by using swt built with jdk17 Co-Authored-By: Ben Wolsieffer --- pkgs/by-name/da/dataexplorer/package.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/da/dataexplorer/package.nix b/pkgs/by-name/da/dataexplorer/package.nix index 4ee2b0a0e81a..09406b6b3beb 100644 --- a/pkgs/by-name/da/dataexplorer/package.nix +++ b/pkgs/by-name/da/dataexplorer/package.nix @@ -4,11 +4,12 @@ , ant # executable fails to start for jdk > 17 , jdk17 +, swt , makeWrapper , strip-nondeterminism -}: - -stdenv.mkDerivation (finalAttrs: { +}: let + swt-jdk17 = swt.override { jdk = jdk17; }; +in stdenv.mkDerivation (finalAttrs: { pname = "dataexplorer"; version = "3.9.0"; @@ -40,12 +41,15 @@ stdenv.mkDerivation (finalAttrs: { runHook preInstall ant -Dprefix=$out/share/ -f build/build.xml install + # Use SWT from nixpkgs + ln -sf '${swt-jdk17}/jars/swt.jar' "$out/share/DataExplorer/java/ext/swt.jar" # The sources contain a wrapper script in $out/share/DataExplorer/DataExplorer # but it hardcodes bash shebang and does not pin the java path. # So we create our own wrapper, using similar cmdline args as upstream. mkdir -p $out/bin makeWrapper ${jdk17}/bin/java $out/bin/DataExplorer \ + --prefix LD_LIBRARY_PATH : '${swt-jdk17}/lib' \ --add-flags "-Xms64m -Xmx3092m -jar $out/share/DataExplorer/DataExplorer.jar" \ --set SWT_GTK3 0