From: Michael Rohleder <mike@rohleder.de>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: 43795@debbugs.gnu.org
Subject: [bug#43795] [PATCH] gnu: stockfish: Update to 12.
Date: Tue, 06 Oct 2020 12:32:57 +0200 [thread overview]
Message-ID: <87tuv77ig6.fsf@rohleder.de> (raw)
In-Reply-To: <87ft6r4wa5.fsf@gnu.org> (Mathieu Othacehe's message of "Tue, 06 Oct 2020 10:02:26 +0200")
[-- Attachment #1.1: Type: text/plain, Size: 319 bytes --]
Thank you for reviewing!
Mathieu Othacehe <othacehe@gnu.org> writes:
>> + (copy-file (assoc-ref inputs "net") "src/nn-82215d0fd0df.nnue")
>
> You could wrap this line and also add a comment explaining why this
> extra input is necessary.
Ok, did this and renamed the input to "neural-network".
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: stockfish: Update to 12 --]
[-- Type: text/x-patch, Size: 2602 bytes --]
>From b128348ff8ea51b957f5bb811f88850ed541186c Mon Sep 17 00:00:00 2001
From: Michael Rohleder <mike@rohleder.de>
Date: Tue, 6 Oct 2020 12:22:33 +0200
Subject: [PATCH] gnu: stockfish: Update to 12.
* gnu/packages/games.scm (stockfish): Update to 12.
[inputs]: Add fetching of the official neural network file.
[arguments]: Add phase 'copy-net to copy this file and embedd it.
---
gnu/packages/games.scm | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 00fc63aedf..d473baa335 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -11409,7 +11409,7 @@ etc. You can also play games on FICS or against an engine.")
(define-public stockfish
(package
(name "stockfish")
- (version "11")
+ (version "12")
(source
(origin
(method git-fetch)
@@ -11418,8 +11418,15 @@ etc. You can also play games on FICS or against an engine.")
(commit (string-append "sf_" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "12mppipinymj8s1ipq9a7is453vncly49c32ym9wvyklsgyxfzlk"))))
+ (base32 "0vcymbwp5nf114pp3ax40s21ki5dckda15vmhr77d1mnq3fn0l32"))))
(build-system gnu-build-system)
+ (inputs
+ `(("neural-network"
+ ,(origin
+ (method url-fetch)
+ (uri "https://tests.stockfishchess.org/api/nn/nn-82215d0fd0df.nnue")
+ (sha256
+ (base32 "1r4yqrh4di05syyhl84hqcz84djpbd605b27zhbxwg6zs07ms8c2"))))))
(arguments
`(#:tests? #f
#:make-flags (list "-C" "src"
@@ -11435,7 +11442,14 @@ etc. You can also play games on FICS or against an engine.")
("mips64el-linux" "general-64")
(_ "general-32"))))
#:phases (modify-phases %standard-phases
- (delete 'configure))))
+ (delete 'configure)
+ ;; The official neural network file is needed for building
+ ;; and is embedded in the resulting binary.
+ (add-after 'unpack 'copy-net
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-file (assoc-ref inputs "neural-network")
+ "src/nn-82215d0fd0df.nnue")
+ #t)))))
(synopsis "Strong chess engine")
(description
"Stockfish is a very strong chess engine. It is much stronger than the
--
2.28.0
[-- Attachment #1.3: Type: text/plain, Size: 116 bytes --]
--
Happiness does not depend on what you have or who your are.
It solely relies on what you think. - Buddha
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
next prev parent reply other threads:[~2020-10-06 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-04 15:33 [bug#43795] [PATCH] gnu: stockfish: Update to 12 Michael Rohleder
2020-10-06 8:02 ` Mathieu Othacehe
2020-10-06 10:32 ` Michael Rohleder [this message]
2020-10-06 11:52 ` bug#43795: " Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tuv77ig6.fsf@rohleder.de \
--to=mike@rohleder.de \
--cc=43795@debbugs.gnu.org \
--cc=othacehe@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).