From 1c0e562a59052e2e6dd953472cd9c12505ae1fa8 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Wed, 4 Jun 2025 07:44:54 -0600 Subject: [PATCH] glamoroustoolkit: add .desktop entry --- pkgs/by-name/gl/glamoroustoolkit/package.nix | 24 ++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gl/glamoroustoolkit/package.nix b/pkgs/by-name/gl/glamoroustoolkit/package.nix index 94debf50ed1f..cb611aa4f22a 100644 --- a/pkgs/by-name/gl/glamoroustoolkit/package.nix +++ b/pkgs/by-name/gl/glamoroustoolkit/package.nix @@ -1,9 +1,11 @@ { lib, stdenv, + fetchurl, fetchzip, wrapGAppsHook3, cairo, + copyDesktopItems, dbus, fontconfig, freetype, @@ -19,12 +21,18 @@ libglvnd, libuuid, libxcb, + makeDesktopItem, harfbuzz, libsoup_3, webkitgtk_4_1, zenity, }: - +let + gkIcon = fetchurl { + url = "https://gist.githubusercontent.com/qbit/cb52e6cd193c410e0b0aee8a216f6574/raw/2b042bde1dc4cbd30457f14c9d18c889444bf3d0/glamoroustoolkit.svg"; + sha256 = "sha256-Trfo8P01anLq9yTFzwqIfsyidLGyuZDg48YQPrGBkgs="; + }; +in stdenv.mkDerivation (finalAttrs: { pname = "glamoroustoolkit"; version = "1.1.24"; @@ -37,6 +45,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ wrapGAppsHook3 + copyDesktopItems ]; sourceRoot = "."; @@ -46,10 +55,21 @@ stdenv.mkDerivation (finalAttrs: { dontPatchELF = true; dontStrip = true; + desktopItems = with finalAttrs; [ + (makeDesktopItem { + name = pname; + desktopName = "GlamorousToolkit"; + exec = "GlamorousToolkit"; + icon = "GlamorousToolkit"; + }) + ]; + installPhase = '' runHook preInstall - install -d $out/bin $out/lib + install -d $out/bin $out/lib $out/share/icons/hicolor/scalable/apps + + cp ${gkIcon} $out/share/icons/hicolor/scalable/apps/GlamorousToolkit.svg cp -r $src/bin $src/lib $out/ cp ${./GlamorousToolkit-GetImage} $out/bin/GlamorousToolkit-GetImage