about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/gnuchess/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/gnuchess/default.nix')
-rw-r--r--nixpkgs/pkgs/games/gnuchess/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/gnuchess/default.nix b/nixpkgs/pkgs/games/gnuchess/default.nix
new file mode 100644
index 000000000000..3acf6a8aa62d
--- /dev/null
+++ b/nixpkgs/pkgs/games/gnuchess/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, flex, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "gnuchess";
+  version = "6.2.9";
+
+  src = fetchurl {
+    url = "mirror://gnu/chess/gnuchess-${version}.tar.gz";
+    sha256 = "sha256-3fzCC911aQCpq2xCx9r5CiiTv38ZzjR0IM42uuvEGJA=";
+  };
+
+  buildInputs = [
+    flex
+  ];
+  nativeBuildInputs = [ makeWrapper ];
+
+  postInstall = ''
+    wrapProgram $out/bin/gnuchessx --set PATH "$out/bin"
+    wrapProgram $out/bin/gnuchessu --set PATH "$out/bin"
+  '';
+
+  meta = with lib; {
+    description = "GNU Chess engine";
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
+    license = licenses.gpl3Plus;
+  };
+}