about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/vms-empire/default.nix
blob: 9da37789f7cd44a265345e336d2623a3bc87c38f (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
{ lib
, stdenv
, fetchurl
, ncurses
, xmlto
, docbook_xml_dtd_44
, docbook_xsl
, installShellFiles
}:

stdenv.mkDerivation rec {
  pname = "vms-empire";
  version = "1.16";

  src = fetchurl{
    url = "http://www.catb.org/~esr/${pname}/${pname}-${version}.tar.gz";
    hash = "sha256-XETIbt/qVU+TpamPc2WQynqqUuZqkTUnItBprjg+gPk=";
  };

  nativeBuildInputs = [ installShellFiles ];
  buildInputs = [
    ncurses
    xmlto
    docbook_xml_dtd_44
    docbook_xsl
  ];

  postBuild = ''
    xmlto man vms-empire.xml
    xmlto html-nochunks vms-empire.xml
  '';

  installPhase = ''
    runHook preInstall
    install -D vms-empire -t ${placeholder "out"}/bin/
    install -D vms-empire.html -t ${placeholder "out"}/share/doc/${pname}/
    install -D vms-empire.desktop -t ${placeholder "out"}/share/applications/
    install -D vms-empire.png -t ${placeholder "out"}/share/icons/hicolor/48x48/apps/
    install -D vms-empire.xml -t ${placeholder "out"}/share/appdata/
    installManPage empire.6
    runHook postInstall
  '';

  hardeningDisable = [ "format" ];

  meta = with lib; {
    homepage = "http://catb.org/~esr/vms-empire/";
    description = "The ancestor of all expand/explore/exploit/exterminate games";
    mainProgram = "vms-empire";
    longDescription = ''
      Empire is a simulation of a full-scale war between two emperors, the
      computer and you. Naturally, there is only room for one, so the object of
      the game is to destroy the other. The computer plays by the same rules
      that you do. This game was ancestral to all later
      expand/explore/exploit/exterminate games, including Civilization and
      Master of Orion.
    '';
    license = licenses.gpl2Only;
    maintainers = [ maintainers.AndersonTorres ];
    platforms = platforms.unix;
  };
}