gnubg: add desktop item

This commit is contained in:
SamLukeYes 2023-07-31 12:22:08 +08:00 committed by Emery Hemingway
parent 45cbde5b8d
commit bf287a02ca

View File

@ -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/";