apery: init at 2.1.0-unstable-2024-06-23

+56
+56
pkgs/by-name/ap/apery/package.nix
··· 1 + { 2 + lib, 3 + rustPlatform, 4 + fetchFromGitHub, 5 + unstableGitUpdater, 6 + }: 7 + 8 + rustPlatform.buildRustPackage { 9 + pname = "apery"; 10 + version = "2.1.0-unstable-2024-06-23"; 11 + 12 + src = fetchFromGitHub { 13 + owner = "HiraokaTakuya"; 14 + # Successor of C++ implementation 15 + # https://github.com/HiraokaTakuya/apery/blob/d14471fc879062bfabbd181eaa91e90c7cc28a71/Readme.txt#L3-L4 16 + repo = "apery_rust"; 17 + rev = "8e64bc427bff033a38f1b60b9013ad2d62f88db7"; 18 + hash = "sha256-Y8IBZISutXNgbuc7/qhNoiwYDCP6M9ukhu48t3oZM18="; 19 + # The submodule includes evaluation files for the installCheckPhase 20 + fetchSubmodules = true; 21 + }; 22 + 23 + cargoHash = "sha256-xaQ83WKXKSAFRSKzaTFnM2lklGLCJG+i7wa8a+KNR/I="; 24 + 25 + checkFlags = [ 26 + "--skip=movegen" 27 + ]; 28 + 29 + doInstallCheck = true; 30 + installCheckPhase = '' 31 + runHook preInstallCheck 32 + 33 + usi_command='isready 34 + go byoyomi 1000 35 + wait' 36 + usi_output="$("$out/bin/apery" <<< "$usi_command")" 37 + [[ "$usi_output" == *'bestmove'* ]] 38 + 39 + runHook postInstallCheck 40 + ''; 41 + 42 + passthru.updateScript = unstableGitUpdater { 43 + tagPrefix = "v"; 44 + branch = "master"; 45 + }; 46 + 47 + meta = { 48 + description = "USI shogi engine"; 49 + homepage = "https://github.com/HiraokaTakuya/apery_rust"; 50 + license = lib.licenses.gpl3Only; 51 + maintainers = with lib.maintainers; [ 52 + kachick 53 + ]; 54 + mainProgram = "apery"; 55 + }; 56 + }