forked from mirrors/nixpkgs
katago: 1.5.0 -> 1.6.0
This commit is contained in:
parent
f9a5d8539d
commit
9d7a579b2e
|
@ -13,17 +13,25 @@
|
||||||
, opencl-headers ? null
|
, opencl-headers ? null
|
||||||
, ocl-icd ? null
|
, ocl-icd ? null
|
||||||
, gperftools ? null
|
, gperftools ? null
|
||||||
|
, eigen ? null
|
||||||
|
, gpuEnabled ? true
|
||||||
|
, useAVX2 ? false
|
||||||
, cudaSupport ? false
|
, cudaSupport ? false
|
||||||
, useTcmalloc ? true}:
|
, useTcmalloc ? true}:
|
||||||
|
|
||||||
|
assert !gpuEnabled -> (
|
||||||
|
eigen != null &&
|
||||||
|
!cudaSupport);
|
||||||
|
|
||||||
assert cudaSupport -> (
|
assert cudaSupport -> (
|
||||||
libGL_driver != null &&
|
libGL_driver != null &&
|
||||||
cudatoolkit != null &&
|
cudatoolkit != null &&
|
||||||
cudnn != null);
|
cudnn != null);
|
||||||
|
|
||||||
assert !cudaSupport -> (
|
assert !cudaSupport -> (
|
||||||
opencl-headers != null &&
|
!gpuEnabled || (
|
||||||
ocl-icd != null);
|
opencl-headers != null &&
|
||||||
|
ocl-icd != null));
|
||||||
|
|
||||||
assert useTcmalloc -> (
|
assert useTcmalloc -> (
|
||||||
gperftools != null);
|
gperftools != null);
|
||||||
|
@ -35,13 +43,13 @@ let
|
||||||
|
|
||||||
in env.mkDerivation rec {
|
in env.mkDerivation rec {
|
||||||
pname = "katago";
|
pname = "katago";
|
||||||
version = "1.5.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lightvector";
|
owner = "lightvector";
|
||||||
repo = "katago";
|
repo = "katago";
|
||||||
rev = "${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0ajdjdmlzwh7zwk5v0k9zzjawgkf7w30pzqp5bhcsdqz4svvyll2";
|
sha256 = "1r84ws2rj7j8085v1cqffy9rg65rzrhk6z8jbxivqxsmsgs2zs48";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -52,10 +60,12 @@ in env.mkDerivation rec {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libzip
|
libzip
|
||||||
boost
|
boost
|
||||||
] ++ lib.optionals cudaSupport [
|
] ++ lib.optionals (!gpuEnabled) [
|
||||||
|
eigen
|
||||||
|
] ++ lib.optionals (gpuEnabled && cudaSupport) [
|
||||||
cudnn
|
cudnn
|
||||||
libGL_driver
|
libGL_driver
|
||||||
] ++ lib.optionals (!cudaSupport) [
|
] ++ lib.optionals (gpuEnabled && !cudaSupport) [
|
||||||
opencl-headers
|
opencl-headers
|
||||||
ocl-icd
|
ocl-icd
|
||||||
] ++ lib.optionals useTcmalloc [
|
] ++ lib.optionals useTcmalloc [
|
||||||
|
@ -64,9 +74,13 @@ in env.mkDerivation rec {
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DNO_GIT_REVISION=ON"
|
"-DNO_GIT_REVISION=ON"
|
||||||
] ++ lib.optionals cudaSupport [
|
] ++ lib.optionals (!gpuEnabled) [
|
||||||
|
"-DUSE_BACKEND=EIGEN"
|
||||||
|
] ++ lib.optionals useAVX2 [
|
||||||
|
"-DUSE_AVX2=ON"
|
||||||
|
] ++ lib.optionals (gpuEnabled && cudaSupport) [
|
||||||
"-DUSE_BACKEND=CUDA"
|
"-DUSE_BACKEND=CUDA"
|
||||||
] ++ lib.optionals (!cudaSupport) [
|
] ++ lib.optionals (gpuEnabled && !cudaSupport) [
|
||||||
"-DUSE_BACKEND=OPENCL"
|
"-DUSE_BACKEND=OPENCL"
|
||||||
] ++ lib.optionals useTcmalloc [
|
] ++ lib.optionals useTcmalloc [
|
||||||
"-DUSE_TCMALLOC=ON"
|
"-DUSE_TCMALLOC=ON"
|
||||||
|
|
|
@ -24383,6 +24383,10 @@ in
|
||||||
cudatoolkit = cudatoolkit_10_2;
|
cudatoolkit = cudatoolkit_10_2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
katagoCPU = katago.override {
|
||||||
|
gpuEnabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
klavaro = callPackage ../games/klavaro {};
|
klavaro = callPackage ../games/klavaro {};
|
||||||
|
|
||||||
kobodeluxe = callPackage ../games/kobodeluxe { };
|
kobodeluxe = callPackage ../games/kobodeluxe { };
|
||||||
|
|
Loading…
Reference in a new issue