From cca3e9c7749230746398aa6311250071f02ee8d3 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 8 May 2016 15:10:36 +0200 Subject: stockfish: update version 6 to 7 --- pkgs/games/stockfish/default.nix | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'pkgs/games/stockfish') diff --git a/pkgs/games/stockfish/default.nix b/pkgs/games/stockfish/default.nix index f919b9683e6..7bf81251646 100644 --- a/pkgs/games/stockfish/default.nix +++ b/pkgs/games/stockfish/default.nix @@ -1,32 +1,36 @@ { 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 { - version = "6"; - name = "stockfish-${version}"; + + name = "stockfish-7"; + src = fetchurl { - url = https://stockfish.s3.amazonaws.com/stockfish-6-src.zip; - sha256 = "a69a371d3f84338cefde4575669bd930d186b046a10fa5ab0f8d1aed6cb204c3"; + url = "https://stockfish.s3.amazonaws.com/${name}-src.zip"; + sha256 = "0djzg3h5d9qs27snf0rr6zl6iaki1jb84v8m8k3c2lcjbj2vpwc9"; }; - buildPhase = '' - cd src - make build ARCH=x86-64 - ''; - buildInputs = [ - stdenv - unzip - ]; + + buildInputs = [ unzip ]; + postUnpack = "sourceRoot+=/src"; + makeFlags = [ "PREFIX=$out" "ARCH=${arch}" ]; + buildFlags = "build"; + enableParallelBuilding = true; - installPhase = '' - mkdir -p $out/bin - cp -pr stockfish $out/bin - ''; + meta = with stdenv.lib; { - homepage = https://stockfishchess.org/; + 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 ]; + maintainers = with maintainers; [ luispedro peti ]; + platforms = with platforms; i686 ++ x86_64; license = licenses.gpl2; }; + } -- cgit 1.4.1