about summary refs log tree commit diff
path: root/pkgs/games/gnubg/default.nix
blob: 84bc7f5df8af04e9aa942038805826b9b85aca75 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib, stdenv, fetchurl, pkg-config, glib, python3, gtk2, readline,
  copyDesktopItems, makeDesktopItem }:

stdenv.mkDerivation rec {
  pname = "gnubg";
  version = "1.07.001";

  src = fetchurl {
    url = "mirror://gnu/gnubg/gnubg-release-${version}-sources.tar.gz";
    hash = "sha256-cjmXKUGcrZ8RLDBmoS0AANpFCkVq3XsJTYkVUGnWgh4=";
  };

  nativeBuildInputs = [ copyDesktopItems pkg-config python3 glib ];

  buildInputs = [ gtk2 readline ];

  strictDeps = true;

  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/";
      license = licenses.gpl3;
      maintainers = [ maintainers.ehmry ];
      platforms = platforms.linux;
    };
}