summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-12-31 01:16:38 +0100
committerPeter Simons <simons@cryp.to>2015-12-31 01:16:38 +0100
commit1b7c1fb382f5b73b654654b9db470852acb1f17d (patch)
treeb0b1edb5da5cef56f7024f84bea39004a0e56b40 /pkgs/games
parent51ebb5a9aafeaa65c0f3cedd202174f297863c09 (diff)
parentc570bc50bc885ee6c87d90f77296b3619a5241c0 (diff)
downloadnixlib-1b7c1fb382f5b73b654654b9db470852acb1f17d.tar
nixlib-1b7c1fb382f5b73b654654b9db470852acb1f17d.tar.gz
nixlib-1b7c1fb382f5b73b654654b9db470852acb1f17d.tar.bz2
nixlib-1b7c1fb382f5b73b654654b9db470852acb1f17d.tar.lz
nixlib-1b7c1fb382f5b73b654654b9db470852acb1f17d.tar.xz
nixlib-1b7c1fb382f5b73b654654b9db470852acb1f17d.tar.zst
nixlib-1b7c1fb382f5b73b654654b9db470852acb1f17d.zip
Merge pull request #11931 from luispedro/add_chessx_stockfish
Add chessx and stockfish (chess engine)
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/chessx/default.nix34
-rw-r--r--pkgs/games/stockfish/default.nix32
2 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/games/chessx/default.nix b/pkgs/games/chessx/default.nix
new file mode 100644
index 000000000000..dd0fa16b707c
--- /dev/null
+++ b/pkgs/games/chessx/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, pkgconfig, zlib, qtbase, qtsvg, qttools, qtmultimedia, fetchurl }:
+stdenv.mkDerivation rec {
+  name = "chessx-${version}";
+  version = "1.3.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/chessx/chessx-${version}.tgz";
+    sha256 = "b136cf56d37d34867cdb9538176e1703b14f61b3384885b6f100580d0af0a3ff";
+  };
+  preConfigure = ''
+    qmake -spec linux-g++ chessx.pro
+  '';
+  buildInputs = [
+   stdenv
+   pkgconfig
+   qtbase
+   qtsvg
+   qttools
+   qtmultimedia
+   zlib
+  ];
+
+  enableParallelBuilding = true;
+  installPhase = ''
+      mkdir -p "$out/bin"
+      cp -pr release/chessx "$out/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://chessx.sourceforge.net/;
+    description = "ChessX allows you to browse and analyse chess games";
+    license = licenses.gpl2;
+    maintainers = [maintainers.luispedro];
+  };
+}
diff --git a/pkgs/games/stockfish/default.nix b/pkgs/games/stockfish/default.nix
new file mode 100644
index 000000000000..f919b9683e6a
--- /dev/null
+++ b/pkgs/games/stockfish/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, unzip }:
+stdenv.mkDerivation rec {
+  version = "6";
+  name = "stockfish-${version}";
+  src = fetchurl {
+    url = https://stockfish.s3.amazonaws.com/stockfish-6-src.zip;
+    sha256 = "a69a371d3f84338cefde4575669bd930d186b046a10fa5ab0f8d1aed6cb204c3";
+  };
+  buildPhase = ''
+  cd src
+  make build ARCH=x86-64
+  '';
+  buildInputs = [
+        stdenv
+        unzip
+  ];
+  enableParallelBuilding = true;
+  installPhase = ''
+  mkdir -p $out/bin
+  cp -pr stockfish $out/bin
+  '';
+  meta = with stdenv.lib; {
+    homepage = https://stockfishchess.org/;
+    description = "Strong open source chess engine";
+    longDescription = ''
+      Stockfish is one of the strongest chess engines in the world. It is also
+      much stronger than the best human chess grandmasters.
+      '';
+    maintainers = with maintainers; [ luispedro ];
+    license = licenses.gpl2;
+  };
+}