Shell.nix for libthai.so.0

I have difficulaties to make libthai.so.0 available to anAppImage.

I tried following shell.nix:

with import <nixpkgs> {};
mkShell {
  NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
    libthai
    stdenv.cc.cc
  ];
  NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";

  buildInputs = [ appimage-run libthai ];
}

I execute nix-shell shell.nix. Then

appimage-run git-butler_0.9.21_amd64.AppImage 

Then I get

git-butler: error while loading shared libraries: libthai.so.0: cannot open shared object file: No such file or directory

But I thought, libthai.so.0 is available because of the statements in shell.nix.

It works for me. Maybe the channel needs to be updated

    environment.systemPackages = with pkgs; [
      (appimage-run.override {
        extraPkgs =
          pkgs: with pkgs; [
            libthai
            libsecret
          ];
      })
    ];
1 Like

neither the nix-shell or the override workarounds work for me. I’m seeing this error with two completely different appimages. I’ll just have to run these apps on a different machine/OS for now

$ ./lume_3.0.1_amd64.AppImage 
lume_3.0.1_amd64.AppImage installed in /home/blee/.cache/appimage-run/8b9ff9cb6ca7c19c9df5a2e686bb8b2a2ae77bc8bfa8dc9a4953ca32e69fb6c4
lume: error while loading shared libraries: libthai.so.0: cannot open shared object file: No such file or directory
$ ./Immersed-x86_64.AppImage 
Immersed-x86_64.AppImage installed in /home/blee/.cache/appimage-run/84a685d57cd96b4a8087baf50ad2b48f6245a84d7a8463411a987b68e9d82424
Immersed: error while loading shared libraries: libthai.so.0: cannot open shared object file: No such file or directory