From bf287a02caa56ce0c71e01723315894af2f062d0 Mon Sep 17 00:00:00 2001 From: SamLukeYes Date: Mon, 31 Jul 2023 12:22:08 +0800 Subject: [PATCH] gnubg: add desktop item --- pkgs/games/gnubg/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/games/gnubg/default.nix b/pkgs/games/gnubg/default.nix index d658ef57ff84..84bc7f5df8af 100644 --- a/pkgs/games/gnubg/default.nix +++ b/pkgs/games/gnubg/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchurl, pkg-config, glib, python3, gtk2, readline }: +{ lib, stdenv, fetchurl, pkg-config, glib, python3, gtk2, readline, + copyDesktopItems, makeDesktopItem }: stdenv.mkDerivation rec { pname = "gnubg"; @@ -9,7 +10,7 @@ stdenv.mkDerivation rec { hash = "sha256-cjmXKUGcrZ8RLDBmoS0AANpFCkVq3XsJTYkVUGnWgh4="; }; - nativeBuildInputs = [ pkg-config python3 glib ]; + nativeBuildInputs = [ copyDesktopItems pkg-config python3 glib ]; buildInputs = [ gtk2 readline ]; @@ -17,6 +18,16 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-gtk" "--with--board3d" ]; + desktopItems = makeDesktopItem { + desktopName = "GNU Backgammon"; + name = pname; + genericName = "Backgammon"; + comment = meta.description; + exec = pname; + icon = pname; + categories = [ "Game" "GTK" "StrategyGame" ]; + }; + meta = with lib; { description = "World class backgammon application"; homepage = "https://www.gnu.org/software/gnubg/";