Appimage Doesn't Found libgirepository

Currently trying to package Release v0.4.2 · korcankaraokcu/PINCE · GitHub but can’t even run it with appimage-run. It sounds like I lack libgirepository, does anyone know where to find this library in nixpkgs?

┌ 12:22 [0s] <notroot@nixos-pc> [~/Downloads]
└─ sudo -E appimage-run ./PINCE-x86_64.AppImage
[sudo] password for notroot:
Sorry, try again.
[sudo] password for notroot:
PINCE-x86_64.AppImage installed in /home/notroot/.cache/appimage-run/7f71fbbb65b5a8e8e543df51a25dfb572062d7bca90f2d70764d36ea34c46b11
Traceback (most recent call last):
  File "/home/notroot/.cache/appimage-run/7f71fbbb65b5a8e8e543df51a25dfb572062d7bca90f2d70764d36ea34c46b11/opt/PINCE/PINCE.py", line 21, in <module>
    import gi
  File "/home/notroot/.cache/appimage-run/7f71fbbb65b5a8e8e543df51a25dfb572062d7bca90f2d70764d36ea34c46b11/usr/conda/lib/python3.12/site-packages/gi/__init__.py", line 40, in <module>
    from . import _gi
ImportError: libgirepository-1.0.so.1: cannot open shared object file: No such file or directory

You can typically use nix-index (and its pre-populated brother nix-index-database) to find libraries in nixpkgs:

nix run github:nix-community/nix-index-database libgirepository-1.0.so.1
1 Like

Thanks, I just added the library and it’s still not giving a different error. I even tried to hook LD_LIBRARY_PATH in shell and it still didn’t find the library.

This is the package

{
  appimageTools,
  fetchurl,
  lib,
  makeDesktopItem,
  gobject-introspection,
}:

let
  pname = "pince";
  version = "0.4.2";

  desktopItem = makeDesktopItem {
    name = pname;
    exec = pname;
    desktopName = pname;
    genericName = "Reverse Engineering for Games";
    categories = [ "Application" ];
  };

in
appimageTools.wrapType2 rec {
  inherit pname version;

  src = fetchurl {
    url = "https://github.com/korcankaraokcu/PINCE/releases/download/v${version}/PINCE-x86_64.AppImage";
    hash = "sha256-f3H7u2W1qOjlQ99Rol37VyBi17ypDy1wdk026jTEaxE=";
  };

  nativeBuildInputs = [ gobject-introspection ];

  extraInstallCommands = ''
    mkdir "$out/share"
    ln -s "${desktopItem}/share/applications" "$out/share/"
  '';

  meta = with lib; {
    description = "Reverse engineering tool for linux games";
    homepage = "https://github.com/korcankaraokcu/PINCE";
    license = licenses.gpl3Plus;
    platforms = lib.platforms.linux;
  };
}

This is the LD_LIBRARY_PATH in shell hook

          shellHook = ''
            export LD_LIBRARY_PATH=${
              pkgs.lib.makeLibraryPath [
                pkgs.gobject-introspection
              ]
            }
          '';

There’s a section on GTK apps here: Nixpkgs Reference Manual that might be helpful for you. In particular, maybe one of wrapGAppsHook*.

1 Like

Still doesn’t work for now :frowning:. I have searched appimage installation on nixpkgs, got nothing. I think I’ll have a better luck on building the package from the ground-up instead.

For anyone that wants to try cheat engine like programs on linux, try installing scanmem on nixpkgs. It will give the user a program called “GameConqueror”. It’s definitely has fewer feature, but sometimes a simple program is more than you need.