pyfa: add desktop-item (#371912)
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user