Packaging up for Nix

Prior discussion: Packaging up for NixOS

Currently, I have a partially working manager. The moment I click on a created or existing business, it crashes due to a segmentation fault.

the partially working nix:

{
	stdenv,
	fetchurl,
	lib,
	appimageTools,
}: 

let 
	pname = "manager";
	version = "24.8.2.1781";
  name = "${pname}-${version}";
	src = fetchurl {
	  url = "https://github.com/Manager-io/Manager/releases/download/${version}/Manager-linux-x64.AppImage";
	  sha256 = "0gnwg1qmcfnvb12fpymyrkpsn32d6my148b5pyxzsgc2d46l54rc";
	}; 

	appimageContents = appimageTools.extract {
		inherit pname version src;
		postExtract = ''
			substituteInPlace $out/${pname}.desktop --replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U'
			'';
	};
in

appimageTools.wrapType2 {
	inherit pname version src;

  extraInstallCommands = ''
    install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
		cp -r ${appimageContents}/usr/share/icons $out/share
  '';

	extraPkgs = pkgs: with pkgs; [
		icu 
		webkit2-sharp 
		webkitgtk
		gtk-sharp-3_0 
		gtk3 
		mono 
		libnotify
		fuse2
	];
}

As I dug deeper in the AppImage of the installer, there is no deps called libstdc++.so.6, which was a required deps by ManagerDesktop in the dir <extracted-folder>/opt/manager. So I tried to include libstdc++.so.6 using stdenv.cc.cc.lib into the extraPkgs, but it did not solve a thing as the deps is still not found.

I would appreciate it if you could point out any incorrect packaging or package the AppImage with all the deps.

1 Like