Problem running custom package

I have modified a .nix file to build a propritary Qt app, chitubox.
original: https://github.com/simon-the-sourcerer-ab/chitubox/blob/00118f899685280ef076d1099c37601b7c981af8/default.nix
updated: chitubox.nix · GitHub

When I attempt to run it as a normal user it hangs. with the only console output being:

   $ ./result/bin/chitubox
   Could not load the Qt platform plugin "xcb" in "" even though it was found.
   resource path: "/nix/store/cqh9a4js9wjqbz0qqa9wfc03f09by6sx-chitubox-1.9.5/bin/../chitubox/resource"
   applicationDirPath(): "/nix/store/cqh9a4js9wjqbz0qqa9wfc03f09by6sx-chitubox-1.9.5/bin"
   currentPath(): "/home/user"
   config path: "/home/user/.config/ChiTuBox"

I can run it with sudo. I do get some console errors about config and log files that it expects to be able to read/write to under /root, but the application window opens.

Interestingly I get the normal user behaviour when run with sudio -E.

So it looks like it has something to do with the normal user envirment vs root, but I’m unsure how to track down what needs to be set/uset/changed.

1 Like

Solved:

1 Like

Turns out that while this gets the program running, there is another component that is crypographicly signed.

when autpatchelf changes the files so that it will run on nixos, it causes it to fail the check.

time to try distrobox I guess…