hubstaff: create .desktop file

This commit is contained in:
pancaek
2026-01-23 16:06:03 -08:00
parent 0fae44bd1d
commit d6f0aaa2f0
+20
View File
@@ -26,6 +26,8 @@
writeShellScript,
common-updater-scripts,
xmlstarlet,
makeDesktopItem,
copyDesktopItems,
}:
let
@@ -67,6 +69,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [
unzip
makeWrapper
copyDesktopItems
];
unpackCmd = ''
@@ -81,7 +84,23 @@ stdenv.mkDerivation {
dontBuild = true;
# Upstream doesn't seem to have a desktop item out of the box
desktopItems = [
(makeDesktopItem {
name = "netsoft-com.netsoft.hubstaff";
desktopName = "Hubstaff";
exec = "HubstaffClient";
icon = "hubstaff";
comment = "Time tracking software";
categories = [
"Office"
"ProjectManagement"
];
})
];
installPhase = ''
runHook preInstall
# remove files for 32-bit arch to skip building for this arch
# but add -f flag to not fail if files were not found (new versions dont provide 32-bit arch)
rm -rf x86 x86_64/lib64
@@ -100,6 +119,7 @@ stdenv.mkDerivation {
# Why is this needed? SEGV otherwise.
ln -s $opt/data/resources $opt/x86_64/resources
runHook postInstall
'';
# to test run: