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