pyfa: add desktop-item

put copydesktopItems in the right spot and add icon to required path

make sure copyDesktopItems actually runs
This commit is contained in:
Christoph Hollizeck
2025-01-07 21:26:43 +01:00
parent 6a25f33c84
commit 59d9636bdf
+20
View File
@@ -6,6 +6,8 @@
adwaita-icon-theme,
wrapGAppsHook3,
gdk-pixbuf,
makeDesktopItem,
copyDesktopItems,
}:
let
version = "2.61.3";
@@ -22,6 +24,17 @@ python3Packages.buildPythonApplication rec {
hash = "sha256-i8NcRTn817gqwQP6j0RPUJkq09eTI4nfe3EVqYnWRpo=";
};
desktopItems = [
(makeDesktopItem {
name = pname;
exec = "${pname} %U";
icon = "pyfa";
desktopName = pname;
genericName = "Python fitting assistant for Eve Online";
categories = [ "Game" ];
})
];
build-system = [ python3Packages.setuptools ];
dependencies = with python3Packages; [
wxpython
@@ -50,6 +63,7 @@ python3Packages.buildPythonApplication rec {
nativeBuildInputs = [
python3Packages.pyinstaller
wrapGAppsHook3
copyDesktopItems
];
#
@@ -90,12 +104,18 @@ python3Packages.buildPythonApplication rec {
# exposing the innards of pyfa to the rest of the env.
#
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/share/pixmaps
mkdir -p $out/share/icons/hicolor/64x64/apps/
cp -r dist/pyfa $out/share/
cp imgs/gui/pyfa64.png $out/share/pixmaps/pyfa.png
cp imgs/gui/pyfa64.png $out/share/icons/hicolor/64x64/apps/${pname}.png
ln -sf $out/share/pyfa/pyfa $out/bin/pyfa
runHook postInstall
'';
fixupPhase = ''