Trying to build a wrapper package for an AppImage I’m running into a problem that at runtime apparently a lib can’t be found:
#configuration.nix
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./appimages.nix
];
#appimages.nix
{ pkgs, lib, inputs, ... }:
let
repetierApp = import ./appimages/repetier.nix { inherit pkgs; };
in
{
programs.appimage.enable = true;
programs.appimage.binfmt = true;
environment.systemPackages = with pkgs; [
libgdiplus
repetierApp
];
}
#appimages/repetier.nix
{ pkgs, ... }:
let
pname = "repetier-host";
version = "2.3.2";
src = pkgs.fetchurl {
url = "https://download3.repetier.com/files/host/linux/Repetier-Host-x86_64-${version}.AppImage";
#nix-hash --type sha256 --flat --base64 Repetier-Host-x86_64-2.3.2.AppImage
hash = "sha256-gvC432ioUA2lbbJKv6CJHD1OKMZZsqA7dUiVX4ygavc=";
};
in
pkgs.appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [
pkgs.libgdiplus
];
}
When starting the app, it crashes with
System.DllNotFoundException: libgdiplus.so.0 assembly:<unknown assembly> type:<unknown type> member:(null)
I’m not sure, if
programs.appimage.binfmt
and
environment.systemPackages = with pkgs; [
libgdiplus
];
is even needed when packaging AppImages this way, added it anyway.
Shouldn’t
extraPkgs = pkgs: [
pkgs.libgdiplus
];
Add the library to the final package env?