Files
nixpkgs/pkgs/by-name/fi/fishnet/update.bash
Kenichi Kamiya aee0feed85 fishnet: 2.13.2 -> 2.14.0
Diff: https://github.com/lichess-org/fishnet/compare/v2.13.2...v2.14.0

Changelog: https://github.com/lichess-org/fishnet/releases/tag/v2.14.0

This update also updates updateScript.
The new stockfish revision f4bcd40409f94bd397a083c5d6243bac6dcc6d85 includes
ab8f901d25
which drops the small net.
2026-08-06 20:39:50 +09:00

33 lines
1.2 KiB
Bash

new_version="$(
curl --fail --silent ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest" |
jq '.tag_name | ltrimstr("v")' --raw-output
)"
stockfish_revision="$(
curl --fail --silent ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/$GITHUB_REPOSITORY/contents/Stockfish?ref=v$new_version" |
jq .sha --raw-output
)"
stockfish_header="$(
curl --fail --silent "https://raw.githubusercontent.com/official-stockfish/Stockfish/$stockfish_revision/src/evaluate.h"
)"
new_nnue_file="$(
echo "$stockfish_header" |
grep --perl-regexp --only-matching 'EvalFileDefaultName "\Knn-(\w+).nnue'
)"
new_nnue_hash="$(
nix --extra-experimental-features nix-command hash to-sri --type sha256 "$(
nix-prefetch-url --type sha256 "https://tests.stockfishchess.org/api/nn/${new_nnue_file}"
)"
)"
# Update NNUE
pkg_body="$(<"$PKG_FILE")"
pkg_body="${pkg_body//"$NNUE_FILE"/"$new_nnue_file"}"
pkg_body="${pkg_body//"$NNUE_HASH"/"$new_nnue_hash"}"
echo "$pkg_body" >"$PKG_FILE"
# Update version, src
update-source-version "$PNAME" "$new_version" --ignore-same-version --print-changes
# Update cargoHash
nix-update --version=skip "$PNAME"