diff --git a/packages/tools/games/key-mapper/default.nix b/packages/tools/games/key-mapper/default.nix index ff06d6f..97ae2e3 100644 --- a/packages/tools/games/key-mapper/default.nix +++ b/packages/tools/games/key-mapper/default.nix @@ -1,4 +1,10 @@ -{ pkgs, lib, python3Packages, python3, gtk3, gobject-introspection, git, wrapGAppsHook, gnome, makeDesktopItem }: +{ + pkgs, lib +, python3Packages, python3 +, gtk3, gobject-introspection, git, gnome +, wrapGAppsHook +, makeDesktopItem +}: python3Packages.buildPythonApplication rec { pname = "key-mapper"; @@ -35,10 +41,16 @@ python3Packages.buildPythonApplication rec { ${python3}/bin/${python3.executable} setup.py install_data --install-dir=$out --root=$out ''; + postInstall = '' + mkdir -p $out/share/icons/hicolor/scalable/apps/ + cp -r ${desktopItem}/share/applications $out/share/ + cp $out/usr/share/key-mapper/key-mapper.svg $out/share/icons/hicolor/scalable/apps/key-mapper.svg + ''; + desktopItem = makeDesktopItem { name = "key-mapper"; - exec = "$out/bin/key-mapper-gtk"; - icon = "$out/usr/share/key-mapper/key-mapper.svg"; + exec = "key-mapper-gtk"; + icon = "key-mapper"; desktopName = "key-mapper"; genericName = "key-mapper"; };