stockfish: update version 6 to 7

This commit is contained in:
Peter Simons
2016-05-08 15:10:58 +02:00
parent 87442aa4f3
commit cca3e9c774
+22 -18
View File
@@ -1,32 +1,36 @@
{ stdenv, fetchurl, unzip }: { stdenv, fetchurl, unzip }:
let arch = if stdenv.isx86_64 then "x86-64" else
if stdenv.isi686 then "x86-32" else
"unknown";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "6";
name = "stockfish-${version}"; name = "stockfish-7";
src = fetchurl { src = fetchurl {
url = https://stockfish.s3.amazonaws.com/stockfish-6-src.zip; url = "https://stockfish.s3.amazonaws.com/${name}-src.zip";
sha256 = "a69a371d3f84338cefde4575669bd930d186b046a10fa5ab0f8d1aed6cb204c3"; sha256 = "0djzg3h5d9qs27snf0rr6zl6iaki1jb84v8m8k3c2lcjbj2vpwc9";
}; };
buildPhase = ''
cd src buildInputs = [ unzip ];
make build ARCH=x86-64 postUnpack = "sourceRoot+=/src";
''; makeFlags = [ "PREFIX=$out" "ARCH=${arch}" ];
buildInputs = [ buildFlags = "build";
stdenv
unzip
];
enableParallelBuilding = true; enableParallelBuilding = true;
installPhase = ''
mkdir -p $out/bin
cp -pr stockfish $out/bin
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://stockfishchess.org/; homepage = "https://stockfishchess.org/";
description = "Strong open source chess engine"; description = "Strong open source chess engine";
longDescription = '' longDescription = ''
Stockfish is one of the strongest chess engines in the world. It is also Stockfish is one of the strongest chess engines in the world. It is also
much stronger than the best human chess grandmasters. much stronger than the best human chess grandmasters.
''; '';
maintainers = with maintainers; [ luispedro ]; maintainers = with maintainers; [ luispedro peti ];
platforms = with platforms; i686 ++ x86_64;
license = licenses.gpl2; license = licenses.gpl2;
}; };
} }