Change:
Generated desktop file for package is missing categories. It can be easily solved by adding to and deleting list. I tested it, it works. But perhaps it would be better to patch desktop file to use /nix/store path as I saw other people do. It would be better to use provided desktop file, or at least recreate it. It is not a bug, but rather improvement request. I need categories set for my desktop, and it would be nice to have them out of the box. And I think it is better to use provided desktop file instead of creating a new one if possible. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:

Discussion:
<del> { lib , SDL2 , SDL2_image , copyDesktopItems , fetchFromGitHub , gettext , glib , gtk3 , libGLU , libdrm , libepoxy , libpcap , libsamplerate , libslirp , makeDesktopItem , mesa , meson , ninja , openssl , perl , pkg-config , python3Packages , stdenv , vte , which , wrapGAppsHook3 </del> <ins> { lib, SDL2, SDL2_image, fetchFromGitHub, gettext, glib, gtk3, libGLU, libdrm, libepoxy, libpcap, libsamplerate, libslirp, mesa, meson, ninja, openssl, perl, pkg-config, python3Packages, stdenv, vte, which, wrapGAppsHook3, </ins> }: stdenv.mkDerivation (finalAttrs: {

hash = "sha256-VcztVzG/IN9N0SVKj6BipyqnhxXC2nTTuMjKMtFKzGw="; }; <del> nativeBuildInputs = [ copyDesktopItems meson ninja perl pkg-config which wrapGAppsHook3 ] ++ (with python3Packages; [ python pyyaml ]); </del> <ins> nativeBuildInputs = [ SDL2 meson ninja perl pkg-config which wrapGAppsHook3 ] ++ (with python3Packages; [ python pyyaml ]); </ins> buildInputs = [ SDL2

vte ]; <del> separateDebugInfo = true; dontUseMesonConfigure = true; setOutputFlags = false; </del> configureFlags = [ "--disable-strip" "--meson=meson"

buildFlags = [ "qemu-system-i386" ]; <del> desktopItems = [ (makeDesktopItem { name = "xemu"; desktopName = "xemu"; exec = "xemu"; icon = "xemu"; }) ]; </del> <ins> separateDebugInfo = true; dontUseMesonConfigure = true; setOutputFlags = false; strictDeps = true; </ins> postPatch = '' patchShebangs .

--replace 'date -u' "date -d @$SOURCE_DATE_EPOCH '+%Y-%m-%d %H:%M:%S'" ''; <del> preConfigure = '' configureFlagsArray+=("--extra-cflags=-DXBOX=1 -Wno-error=redundant-decls") '' + # When the data below can't be obtained through git, the build process tries # to run `XEMU_COMMIT=$(cat XEMU_COMMIT)` (and similar) '' echo '${finalAttrs.version}' > XEMU_VERSION ''; </del> <ins> preConfigure = '' configureFlagsArray+=("--extra-cflags=-DXBOX=1 -Wno-error=redundant-decls") '' + # When the data below can't be obtained through git, the build process tries # to run `XEMU_COMMIT=$(cat XEMU_COMMIT)` (and similar) '' echo '${finalAttrs.version}' > XEMU_VERSION ''; </ins> preBuild = '' cd build substituteInPlace ./build.ninja --replace /usr/bin/env $(which env) ''; <del> installPhase = let installIcon = resolution: '' install -Dm644 -T ../ui/icons/xemu_${resolution}.png  $out/share/icons/hicolor/${resolution}/apps/xemu.png </del> <ins> installPhase = let installIcon = resolution: '' install -Dm644 -T ../ui/icons/xemu_${resolution}.png  $out/share/icons/hicolor/${resolution}/apps/xemu.png ''; in '' runHook preInstall install -Dm755 -T qemu-system-i386 $out/bin/xemu '' + (lib.concatMapStringsSep "n" installIcon [ "16x16" "24x24" "32x32" "48x48" "128x128" "256x256" "512x512" ]) + "n" + '' install -Dm644 -T ../ui/xemu.desktop $out/share/applications/xemu.desktop runHook postInstall </ins> ''; <del> in '' runHook preInstall install -Dm755 -T qemu-system-i386 $out/bin/xemu '' + (lib.concatMapStringsSep "n" installIcon [ "16x16" "24x24" "32x32" "48x48" "128x128" "256x256" "512x512" ]) + "n" + '' runHook postInstall ''; </del> meta = { homepage = "https://xemu.app/";

platforms = lib.platforms.linux; }; }) <ins> # TODO: investigate failure when using __structuredAttrs </ins>