about summary refs log tree commit diff
path: root/pkgs/games/ace-of-penguins/default.nix
blob: fb15aedc1df853df28e3cf68470db3f5a97cfb3b (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{ lib
, stdenv
, fetchurl
, copyDesktopItems
, libX11
, libXpm
, libpng
, makeDesktopItem
, zlib
}:

stdenv.mkDerivation rec {
  pname = "ace-of-penguins";
  version = "1.4";

  src = fetchurl {
    url = "http://www.delorie.com/store/ace/ace-${version}.tar.gz";
    hash = "sha256-H+47BTOSGkKHPAYj8z2HOgZ7HuxY8scMAUSRRueaTM4=";
  };

  patches = [
    # Fixes a bunch of miscompilations in modern environments
    ./fixup-miscompilations.patch
  ];

  nativeBuildInputs = [
    copyDesktopItems
  ];

  buildInputs = [
    libX11
    libXpm
    libpng
    zlib
  ];

  desktopItems = let
    generateItem = gameName: {
      name = "${pname}-${gameName}";
      exec = "${placeholder "out"}/bin/${gameName}";
      comment = "Ace of Penguins ${gameName} Card Game";
      desktopName = gameName;
      genericName = gameName;
    };
  in
    map (x: makeDesktopItem (generateItem x)) [
      "canfield"
      "freecell"
      "golf"
      "mastermind"
      "merlin"
      "minesweeper"
      "pegged"
      "penguins"
      "solitaire"
      "spider"
      "taipedit"
      "taipei"
      "thornq"
    ];

  meta = with lib; {
    homepage = "http://www.delorie.com/store/ace/";
    description = "Solitaire games in X11";
    longDescription = ''
      The Ace of Penguins is a set of Unix/X solitaire games based on the ones
      available for Windows(tm) but with a number of enhancements that my wife
      says make my versions better :-)

      The latest version includes clones of freecell, golf, mastermind, merlin,
      minesweeper, pegged, solitaire, taipei (with editor!), and thornq (by
      Martin Thornquist).
    '';
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ AndersonTorres ];
    platforms = platforms.linux;
  };
}