summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorMichael Reilly <OmnipotentEntity@gmail.com>2020-08-26 11:34:30 -0400
committerMichael Reilly <OmnipotentEntity@gmail.com>2020-08-28 13:48:49 -0400
commit12c0b4ac587bc1b4eccd81a66e03196710175d47 (patch)
tree657f0a187eabd28e75394ce7132346767867771c /pkgs/games
parent2446a98e33590c6d096ce7ece305a186b89d5966 (diff)
downloadnixpkgs-12c0b4ac587bc1b4eccd81a66e03196710175d47.tar
nixpkgs-12c0b4ac587bc1b4eccd81a66e03196710175d47.tar.gz
nixpkgs-12c0b4ac587bc1b4eccd81a66e03196710175d47.tar.bz2
nixpkgs-12c0b4ac587bc1b4eccd81a66e03196710175d47.tar.lz
nixpkgs-12c0b4ac587bc1b4eccd81a66e03196710175d47.tar.xz
nixpkgs-12c0b4ac587bc1b4eccd81a66e03196710175d47.tar.zst
nixpkgs-12c0b4ac587bc1b4eccd81a66e03196710175d47.zip
katago: 1.6.0 -> 1.6.1
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/katago/default.nix51
1 files changed, 27 insertions, 24 deletions
diff --git a/pkgs/games/katago/default.nix b/pkgs/games/katago/default.nix
index c0fe7d28225..20ad47d3e0a 100644
--- a/pkgs/games/katago/default.nix
+++ b/pkgs/games/katago/default.nix
@@ -14,42 +14,43 @@
 , ocl-icd ? null
 , gperftools ? null
 , eigen ? null
-, gpuEnabled ? true
-, useAVX2 ? false
-, cudaSupport ? false
-, useTcmalloc ? true}:
+, enableAVX2 ? false
+, enableBigBoards ? false
+, enableCuda ? false
+, enableGPU ? true
+, enableTcmalloc ? true}:
 
-assert !gpuEnabled -> (
+assert !enableGPU -> (
   eigen != null &&
-  !cudaSupport);
+  !enableCuda);
 
-assert cudaSupport -> (
+assert enableCuda -> (
   libGL_driver != null &&
   cudatoolkit != null &&
   cudnn != null);
 
-assert !cudaSupport -> (
-  !gpuEnabled || (
+assert !enableCuda -> (
+  !enableGPU || (
     opencl-headers != null &&
     ocl-icd != null));
 
-assert useTcmalloc -> (
+assert enableTcmalloc -> (
   gperftools != null);
 
 let
-  env = if cudaSupport
+  env = if enableCuda
     then gcc8Stdenv
     else stdenv;
 
 in env.mkDerivation rec {
   pname = "katago";
-  version = "1.6.0";
+  version = "1.6.1";
 
   src = fetchFromGitHub {
     owner = "lightvector";
     repo = "katago";
     rev = "v${version}";
-    sha256 = "1r84ws2rj7j8085v1cqffy9rg65rzrhk6z8jbxivqxsmsgs2zs48";
+    sha256 = "030ff9prnvpadgcb4x4hx6b6ggg10bwqcj8vd8nwrdz9sjq67yf7";
   };
 
   nativeBuildInputs = [
@@ -60,42 +61,44 @@ in env.mkDerivation rec {
   buildInputs = [
     libzip
     boost
-  ] ++ lib.optionals (!gpuEnabled) [
+  ] ++ lib.optionals (!enableGPU) [
     eigen
-  ] ++ lib.optionals (gpuEnabled && cudaSupport) [
+  ] ++ lib.optionals (enableGPU && enableCuda) [
     cudnn
     libGL_driver
-  ] ++ lib.optionals (gpuEnabled && !cudaSupport) [
+  ] ++ lib.optionals (enableGPU && !enableCuda) [
     opencl-headers
     ocl-icd
-  ] ++ lib.optionals useTcmalloc [
+  ] ++ lib.optionals enableTcmalloc [
     gperftools
   ];
 
   cmakeFlags = [
     "-DNO_GIT_REVISION=ON"
-  ] ++ lib.optionals (!gpuEnabled) [
+  ] ++ lib.optionals (!enableGPU) [
     "-DUSE_BACKEND=EIGEN"
-  ] ++ lib.optionals useAVX2 [
+  ] ++ lib.optionals enableAVX2 [
     "-DUSE_AVX2=ON"
-  ] ++ lib.optionals (gpuEnabled && cudaSupport) [
+  ] ++ lib.optionals (enableGPU && enableCuda) [
     "-DUSE_BACKEND=CUDA"
-  ] ++ lib.optionals (gpuEnabled && !cudaSupport) [
+  ] ++ lib.optionals (enableGPU && !enableCuda) [
     "-DUSE_BACKEND=OPENCL"
-  ] ++ lib.optionals useTcmalloc [
+  ] ++ lib.optionals enableTcmalloc [
     "-DUSE_TCMALLOC=ON"
+  ] ++ lib.optionals enableBigBoards [
+    "-DUSE_BIGGER_BOARDS_EXPENSIVE=ON"
   ];
 
   preConfigure = ''
     cd cpp/
-  '' + lib.optionalString cudaSupport ''
+  '' + lib.optionalString enableCuda ''
     export CUDA_PATH="${cudatoolkit}"
     export EXTRA_LDFLAGS="-L/run/opengl-driver/lib"
   '';
 
   installPhase = ''
     mkdir -p $out/bin; cp katago $out/bin;
-  '' + lib.optionalString cudaSupport ''
+  '' + lib.optionalString enableCuda ''
     wrapProgram $out/bin/katago \
       --prefix LD_LIBRARY_PATH : "/run/opengl-driver/lib"
   '';