Error when packaging a binary

I’m trying to packaging a binary for pop.com like this:

{ pkgs ? import <nixpkgs> {} }:

with pkgs;
stdenv.mkDerivation rec {
  name = "pop-${version}";
  version = "6.0.2";

  src = fetchurl {
    url = "https://download.pop.com/desktop-app/linux/${version}/pop_${version}_amd64.deb";
    sha256 = "1b95hm56q3w7jvil9689v1ag3cg1l62as5x0lhmh3iqrixrj6nmd";
  };

  nativeBuildInputs = [
    binutils
    autoPatchelfHook
    desktop-file-utils
  ];

  buildInputs = with pkgs; [
    alsaLib atk at-spi2-atk at-spi2-core cairo dbus expat libgcc gdk_pixbuf glib glibc gtk3 hicolor-icon-theme  cups libnotify utillinux nspr nss pango  xpra mesa xdg-utils
  ] ++ (with pkgs.xorg; [
    libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender libXtst
  ]);

  unpackPhase = ''
    ar -x $src data.tar.xz
    tar xf data.tar.xz    
  '';

  installPhase = ''
    desktop-file-edit usr/share/applications/pop.desktop --remove-key=Exec --set-key=Exec --set-value="$out/lib/pop/Pop %U"  --remove-key=Icon --set-key=Icon --set-value="$out/share/pixmaps/pop.png"
    mkdir -p $out
    cp -r usr/* $out
  '';

  meta = with lib; {
    homepage = https://pop.com;
    description = "Low latency videoconferencing & screen sharing with multiplayer drawing & control. Pop is a multiplayer screen sharing app that lets you work together like you’re in the same room.";
    platforms = platforms.linux;
    maintainers = with maintainers; [ ];
  };
}

The build completed, but when I run the main bin program, I got this error:

xdg-settings: default-url-scheme-handler not implemented for xfce
Failed to generate minidump.Illegal instruction (core dumped)

any idea to fix this?

Looks like the error is right, it will not work on Xfce:

Looking at

spoofing your desktop by running with XDG_CURRENT_DESKTOP=X-Generic might help.

2 Likes

Thanks, that fixed the xdg error. But the app still fails to start with the other error message Failed to generate minidump.Illegal instruction (core dumped)

I also tried to wrap that package inside a buildFHSUserEnv environment but the error remains