From d6f0aaa2f053473d10ff256becb83c45ef020348 Mon Sep 17 00:00:00 2001 From: pancaek <20342389+pancaek@users.noreply.github.com> Date: Fri, 23 Jan 2026 16:02:16 -0800 Subject: [PATCH] hubstaff: create .desktop file --- pkgs/by-name/hu/hubstaff/package.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/by-name/hu/hubstaff/package.nix b/pkgs/by-name/hu/hubstaff/package.nix index a0c25284f576..afb7e2c9256f 100644 --- a/pkgs/by-name/hu/hubstaff/package.nix +++ b/pkgs/by-name/hu/hubstaff/package.nix @@ -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: