about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorSamLukeYes <samlukeyes123@gmail.com>2023-07-31 12:22:08 +0800
committerEmery Hemingway <ehmry@posteo.net>2023-07-31 09:47:32 +0100
commitbf287a02caa56ce0c71e01723315894af2f062d0 (patch)
tree736556ae8e7338b5deb675d5a902f5600ae9997a /pkgs/games
parent45cbde5b8d7f193faacb00828509dce5f26131eb (diff)
gnubg: add desktop item
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/gnubg/default.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/games/gnubg/default.nix b/pkgs/games/gnubg/default.nix
index d658ef57ff845..84bc7f5df8af0 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/";