NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.72k stars 13.16k forks source link

Update request: SWT 4.5→ SWT-4.26 #219771

Open deftdawg opened 1 year ago

deftdawg commented 1 year ago

Notify maintainers


Note for maintainers: Please tag this issue in your PR.

The swt package (which dates from 2015) no longer works with Gtk2 shipped in NixPkgs as it 21 point releases behind being current:

***WARNING: GTK+ version too new (major mismatch)
***WARNING: SWT requires GTK 2.18.0
***WARNING: Detected: 2.24.33
emilylange commented 1 year ago

cc @bb010g (maintainer of that package)

daniel-sampliner commented 1 year ago

I hit this issue while trying to build https://github.com/BiglySoftware/BiglyBT, so I took a crack at updating to the latest SWT version here.

This seems to work for my purposes (in that BiglyBT builds and the entire UI appears functional), however there is a a conflict with trying to merge that back in. A couple of packages are relying on a jdk8 build of SWT, however SWT has not supported jdk8 for a couple years; attempting to use jdk8 causes the build to fail:

     [exec] Building GTK3 bindings:
     [exec] gcc  -DSWT_VERSION=4958r2    -DLINUX -DGTK -I/nix/store/4agh2lx6ggpp5g3zl9a2w5a0h0a78nwy-openjdk-8u352-ga/lib/openjdk/include -I/nix/store/4agh2lx6ggpp5g3zl9>
     [exec] *** GTK3 Build failed, aborting further actions..
     [exec] swt.c: In function 'JNI_OnLoad':
     [exec] swt.c:24:16: error: 'JNI_VERSION_10' undeclared (first use in this function); did you mean 'JNI_VERSION_1_6'?
     [exec]    24 |         return JNI_VERSION_10;
     [exec]       |                ^~~~~~~~~~~~~~
     [exec]       |                JNI_VERSION_1_6
     [exec] swt.c:24:16: note: each undeclared identifier is reported only once for each function it appears in
     [exec] make: *** [make_linux.mak:142: swt.o] Error 1

The packages relying on swt_jdk8 appear to be:

I'll try to take a look at them to see if they can use newer jdk/SWT without much hassle.

raspher commented 6 months ago

@daniel-sampliner AFAIK BiglyBt relies on it's own jars of swt which are in their git repo for each architecture they support. It's from their ReadMe

Please correct me if i'm wrong, BiglyBt package is one i definitely want in NixOs