I’m trying to package RustDesk. I failed building it from source because it needs
vcpkg and I was unable to build it
So I decided to try to package the pre-built binary first and maybe come back later and compile it when I know more about Nix.
I managed to unpack the
.deb file and also added all dependencies so that
autoPatchElfHook can do it’s magic. But when I try to run it, I get a runtime panic:
thread 'main' panicked at 'error: 'libsciter-gtk.so' was not found neither in PATH nor near the current executable. Please verify that Sciter SDK is installed and its binaries (from bin.lnx) are available in PATH.', libs/rust-sciter/src/lib.rs:367:21 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Aborted (core dumped)
.deb contains a file
usr/lib/rustdesk/libsciter-gtk.so which, as far as I can tell, should be loaded at runtime.
I tried adding it using
patchelf in the
postFixup script but without luck (I tried both lines separately and together):
patchelf --add-needed $out/lib/rustdesk/libsciter-gtk.so $out/bin/rustdesk patchelf --set-soname libsciter-gtk.so $out/lib/rustdesk/libsciter-gtk.so $out/bin/rustdesk
Does anyone know how to fix this?
Current state of the
default.nix (at the time of writing this): https://github.com/x3rAx/nixpkgs/blob/e1ff35b08d0be0ad9dde07f34a7d67f5af9390d6/pkgs/applications/networking/remote/rustdesk-bin/default.nix