diff options
author | Peter Simons <simons@cryp.to> | 2016-05-08 15:10:36 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2016-05-08 15:10:58 +0200 |
commit | cca3e9c7749230746398aa6311250071f02ee8d3 (patch) | |
tree | dbd4967acf7c22c0db94a7d6771841c7ce37c9ec /pkgs/games/stockfish | |
parent | 87442aa4f3ede7cb3338b978974dcb897487599d (diff) | |
download | nixpkgs-cca3e9c7749230746398aa6311250071f02ee8d3.tar nixpkgs-cca3e9c7749230746398aa6311250071f02ee8d3.tar.gz nixpkgs-cca3e9c7749230746398aa6311250071f02ee8d3.tar.bz2 nixpkgs-cca3e9c7749230746398aa6311250071f02ee8d3.tar.lz nixpkgs-cca3e9c7749230746398aa6311250071f02ee8d3.tar.xz nixpkgs-cca3e9c7749230746398aa6311250071f02ee8d3.tar.zst nixpkgs-cca3e9c7749230746398aa6311250071f02ee8d3.zip |
stockfish: update version 6 to 7
Diffstat (limited to 'pkgs/games/stockfish')
-rw-r--r-- | pkgs/games/stockfish/default.nix | 40 |
1 files changed, 22 insertions, 18 deletions
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; }; + } |