Dear community,
I am struggling a bit on getting a software package run on
First of all: My primary goal is to get it to run, no matter in which way. Therefore, I was going for the pre-built package provided on the ChimeraX website (Download UCSF ChimeraX) trying to get it to run via buildFHSUserEnv:
# my fhsenv.nix
let
pkgs = import <nixpkgs> {};
in pkgs.buildFHSUserEnv {
name = "fhs";
targetPkgs = pkgs: [
pkgs.glib
pkgs.libGL
pkgs.libxkbcommon
pkgs.fontconfig
pkgs.qt6.qtbase
# pkgs.haskellPackages.stack
];
}
This fails unfortunately for no reason I would be able to comprehend (presumably the xcb plugin delivered with ChimeraX is not compatible with my installed Qt-system?). Of note, using the plugins directory of my system($QT_QPA_PLATFORM_PLUGIN_PATH=/nix/store/pvb668ggghwccpbpzmjqcbm0pans7cnc-qtbase-5.15.3-bin/lib/qt-5.15.3/plugins) also leads to the same error:
(base) fhs-chrootenv:moritz@mopad:~/Downloads/chimerax-1.4$ QT_QPA_PLATFORM_PLUGIN_PATH=./lib/python3.9/site-packages/PyQt6/Qt6/plugins/ ./ChimeraX
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "./lib/python3.9/site-packages/PyQt6/Qt6/plugins/" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-egl, wayland, xcb.
Fatal Python error: Aborted
Current thread 0x00007f22325d4b80 (most recent call first):
File "/home/moritz/Downloads/chimerax-1.4/lib/python3.9/site-packages/chimerax/ui/gui.py", line 163 in __init__
File "/home/moritz/Downloads/chimerax-1.4/lib/python3.9/site-packages/ChimeraX_main.py", line 580 in init
File "/home/moritz/Downloads/chimerax-1.4/lib/python3.9/site-packages/ChimeraX_main.py", line 1021 in <module>
File "/home/moritz/Downloads/chimerax-1.4/lib/python3.9/runpy.py", line 87 in _run_code
File "/home/moritz/Downloads/chimerax-1.4/lib/python3.9/runpy.py", line 197 in _run_module_as_main
Aborted (core dumped)
In the ideal scenario, there would be a simple fix for the mentioned error, however if there is none, I would like to ask for advice on which way to take to package this software most efficiently (in terms of effort):
- There is the prebuilt package I used for my BuildFHSUserEnv-attempts (tar-ball containing lib/, bin/, share/, include/ directories)
- There are .deb- and .rpm-packages (Download UCSF ChimeraX)
- The source code is available here: https://github.com/RBVI/ChimeraX/, however I am not sure if I want to comprehend their Makefile-based build system to a degree that allows me to package the software in nix.
I have been using and hacking nixos for a while now, but I am still far from fluent in writing new packages.
Thank you for any advice you might have,
Moritz