Merge pull request #108379 from SuperSandro2000/cleanups

This commit is contained in:
Sandro 2021-01-05 02:19:24 +01:00 committed by GitHub
commit f53c431645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 11 deletions

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
sha256 = "1jqjzhch0rips0vp04prvb8vmc20c5pdmsqn8knadcf91yy859fh"; sha256 = "1jqjzhch0rips0vp04prvb8vmc20c5pdmsqn8knadcf91yy859fh";
}; };
buildInputs = if mpi then [ pkgs.openmpi ] else []; buildInputs = stdenv.lib.optionals mpi [ pkgs.openmpi ];
# TODO darwin, AVX and AVX2 makefile targets # TODO darwin, AVX and AVX2 makefile targets
buildPhase = if mpi then '' buildPhase = if mpi then ''

View File

@ -1,8 +1,13 @@
{ stdenv, fetchFromGitHub, cmake, llvmPackages, enableAVX ? false }: { stdenv
, fetchFromGitHub
, cmake
, llvmPackages
, enableAVX ? stdenv.hostPlatform.avxSupport
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "NGT"; pname = "NGT";
version = "v1.12.3-alpha"; version = "v1.12.3-alpha";
nativeBuildInputs = [ cmake ];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "yahoojapan"; owner = "yahoojapan";
@ -11,11 +16,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-nu0MJNpaenOB4+evoSVLKmPIuZXVj1Rm9x53+TfhezY="; sha256 = "sha256-nu0MJNpaenOB4+evoSVLKmPIuZXVj1Rm9x53+TfhezY=";
}; };
nativeBuildInputs = [ cmake ];
buildInputs = [ llvmPackages.openmp ]; buildInputs = [ llvmPackages.openmp ];
NIX_ENFORCE_NO_NATIVE=! enableAVX;
__AVX2__ = if enableAVX then 1 else 0;
enableParallelBuilding = true; NIX_ENFORCE_NO_NATIVE = ! enableAVX;
__AVX2__ = if enableAVX then 1 else 0;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://github.com/yahoojapan/NGT"; homepage = "https://github.com/yahoojapan/NGT";

View File

@ -14,11 +14,12 @@
, ocl-icd ? null , ocl-icd ? null
, gperftools ? null , gperftools ? null
, eigen ? null , eigen ? null
, enableAVX2 ? false , enableAVX2 ? stdenv.hostPlatform.avx2Support
, enableBigBoards ? false , enableBigBoards ? false
, enableCuda ? false , enableCuda ? false
, enableGPU ? true , enableGPU ? true
, enableTcmalloc ? true}: , enableTcmalloc ? true
}:
assert !enableGPU -> ( assert !enableGPU -> (
eigen != null && eigen != null &&
@ -103,8 +104,6 @@ in env.mkDerivation rec {
--prefix LD_LIBRARY_PATH : "/run/opengl-driver/lib" --prefix LD_LIBRARY_PATH : "/run/opengl-driver/lib"
''; '';
enableParallelBuilding = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Go engine modeled after AlphaGo Zero"; description = "Go engine modeled after AlphaGo Zero";
homepage = "https://github.com/lightvector/katago"; homepage = "https://github.com/lightvector/katago";

View File

@ -23453,7 +23453,7 @@ in
nedit = callPackage ../applications/editors/nedit { }; nedit = callPackage ../applications/editors/nedit { };
ngt = callPackage ../development/libraries/ngt { enableAVX = false; }; ngt = callPackage ../development/libraries/ngt { };
nheko = libsForQt5.callPackage ../applications/networking/instant-messengers/nheko { }; nheko = libsForQt5.callPackage ../applications/networking/instant-messengers/nheko { };