Getting OpenLCA to run (java, dynamically linked libraries)

OpenLCA is an open source Life-Cycle-Assessment program.

It appears to be written in Java, using the Eclipse runtime and GTK3.

I tried running the binay and adding missing dynamic libraries:

programs.nix-ld = {
        enable = true;
        libraries = with pkgs; [
                swt
                gtk3
        ];
};

But still, I get

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
        /path/to/openLCA/configuration/org.eclipse.osgi/83/0/.cp/libswt-pi3-gtk-4969r18.so: libgtk-3.so.0: cannot open shared object file: No such file or directory
        no swt-pi3-gtk in java.library.path: /etc/sane-libs:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
        no swt-pi3 in java.library.path: /etc/sane-libs:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib

I debugged this with Mistral and it seems the program now works with the following added libraries

programs.nix-ld = {
        enable = true;
        libraries = with pkgs; [
                swt
                gtk3
                glib
                pango
                cairo
                gdk-pixbuf
                webkitgtk_4_1 # broken with latest version webkitgtk_6_0
        ];
};

It still has no desktop icon, but seems to work on Wayland. After adding a desktop entry with the “glossy.png” icon is shows correctly too.

The program seems to rely heavily on WebkitGTK for previews and browsing and is not compatible with the latest version.