blob: 6a808080517b4bc35b0cceaab02e7050179a561d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, fetchurl
}:
let
nnueFile = "nn-5af11540bbfe.nnue";
nnue = fetchurl {
url = "https://tests.stockfishchess.org/api/nn/${nnueFile}";
hash = "sha256-WvEVQLv+/LVOOMXdAAyrS0ad+nWZodVb5dJyLCCokps=";
};
in
rustPlatform.buildRustPackage rec {
pname = "fishnet";
version = "2.7.1";
src = fetchFromGitHub {
owner = "lichess-org";
repo = pname;
rev = "v${version}";
hash = "sha256-q73oGQYSWx1aFy9IvbGpecOoc0wLEY2IzJH9GufnvCs=";
fetchSubmodules = true;
};
postPatch = ''
cp -v '${nnue}' 'Stockfish/src/${nnueFile}'
cp -v '${nnue}' 'Fairy-Stockfish/src/${nnueFile}'
'';
# Copying again bacause the file is deleted during build.
postBuild = ''
cp -v '${nnue}' 'Stockfish/src/${nnueFile}'
'';
cargoHash = "sha256-NO3u2ZXSiDQnZ/FFZLOtTnQoGMyN9pSI4sqGIXtjEcI=";
meta = with lib; {
description = "Distributed Stockfish analysis for lichess.org";
homepage = "https://github.com/lichess-org/fishnet";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ tu-maurice ];
platforms = [ "aarch64-linux" "x86_64-linux" ];
};
}
|