gnu: stockfish: Factor out the neural network revision.

* gnu/packages/games.scm (stockfish): Factor out the neural-network-revision.
This commit is contained in:
Tobias Geerinckx-Rice 2021-07-03 00:14:37 +02:00
parent 8630017e2e
commit c33e2009d4
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -11962,6 +11962,7 @@ (define-public chessx
(license license:gpl2+)))
(define-public stockfish
(let ((neural-network-revision "3475407dc199")) ; also update hash below
(package
(name "stockfish")
(version "14")
@ -11979,9 +11980,11 @@ (define-public stockfish
`(("neural-network"
,(origin
(method url-fetch)
(uri "https://tests.stockfishchess.org/api/nn/nn-3475407dc199.nnue")
(uri (string-append "https://tests.stockfishchess.org/api/nn/nn-"
neural-network-revision ".nnue"))
(sha256
(base32 "11zci5kgwdw9rh8w2w4p84764g82rr666y3n8r2flwwrq5yl0x9l"))))))
(base32
"11zci5kgwdw9rh8w2w4p84764g82rr666y3n8r2flwwrq5yl0x9l"))))))
(arguments
`(#:tests? #f
#:make-flags (list "-C" "src"
@ -12003,15 +12006,15 @@ (define-public stockfish
(add-after 'unpack 'copy-net
(lambda* (#:key inputs #:allow-other-keys)
(copy-file (assoc-ref inputs "neural-network")
"src/nn-3475407dc199.nnue")
#t)))))
(format #f "src/nn-~a.nnue"
,neural-network-revision)))))))
(synopsis "Strong chess engine")
(description
"Stockfish is a very strong chess engine. It is much stronger than the
best human chess grandmasters. It can be used with UCI-compatible GUIs like
ChessX.")
(home-page "https://stockfishchess.org/")
(license license:gpl3+)))
(license license:gpl3+))))
(define-public barrage
(package