summary refs log tree commit diff
path: root/pkgs/games/gnuchess/default.nix
blob: 9f7d1684a5c44fca75df8030e404704b0df6c255 (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
{lib, stdenv, fetchurl, flex, makeWrapper}:
let
  s = # Generated upstream information
  rec {
    baseName="gnuchess";
    version="6.2.8";
    name="${baseName}-${version}";
    url="mirror://gnu/chess/${name}.tar.gz";
    sha256="0irqb0wl30c2i1rs8f6mm1c89l7l9nxxv7533lr408h1m36lc16m";
  };
  buildInputs = [
    flex
  ];
in
stdenv.mkDerivation {
  inherit (s) name version;
  src = fetchurl {
    inherit (s) url sha256;
  };
  inherit buildInputs;
  nativeBuildInputs = [ makeWrapper ];

  postInstall = ''
    wrapProgram $out/bin/gnuchessx --set PATH "$out/bin"
    wrapProgram $out/bin/gnuchessu --set PATH "$out/bin"
  '';

  meta = {
    inherit (s) version;
    description = "GNU Chess engine";
    maintainers = [lib.maintainers.raskin];
    platforms = lib.platforms.unix;
    license = lib.licenses.gpl3Plus;
  };
}