nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 72 lines 1.4 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 meson, 6 ninja, 7 pkg-config, 8 python3, 9 zlib, 10 gtest, 11 eigen, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "lc0"; 16 version = "0.31.2"; 17 18 src = fetchFromGitHub { 19 owner = "LeelaChessZero"; 20 repo = "lc0"; 21 tag = "v${version}"; 22 hash = "sha256-8watDDxSyZ5khYqpXPyjQso2MkOzfI6o2nt0vkuiEUI="; 23 fetchSubmodules = true; 24 }; 25 26 patchPhase = '' 27 runHook prePatch 28 29 patchShebangs --build scripts/* 30 31 runHook postPatch 32 ''; 33 34 strictDeps = true; 35 36 nativeBuildInputs = [ 37 meson 38 ninja 39 pkg-config 40 python3 41 ]; 42 43 buildInputs = [ 44 eigen 45 gtest 46 zlib 47 ]; 48 49 mesonFlags = [ 50 "-Dplain_cuda=false" 51 "-Daccelerate=false" 52 "-Dmetal=disabled" 53 "-Dembed=false" 54 ] 55 # in version 31 this option will be required 56 ++ lib.optionals (lib.versionAtLeast version "0.31") [ "-Dnative_cuda=false" ]; 57 58 enableParallelBuilding = true; 59 60 meta = { 61 homepage = "https://lczero.org/"; 62 description = "Open source neural network based chess engine"; 63 longDescription = '' 64 Lc0 is a UCI-compliant chess engine designed to play chess via neural network, specifically those of the LeelaChessZero project. 65 ''; 66 maintainers = with lib.maintainers; [ _9glenda ]; 67 platforms = lib.platforms.unix; 68 license = lib.licenses.gpl3Plus; 69 broken = stdenv.hostPlatform.isDarwin; 70 }; 71 72}