Archived
1
0
Fork 0

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