all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zamfofex <zamfofex@twdb.moe>
To: 66654@debbugs.gnu.org
Cc: zamfofex <zamfofex@twdb.moe>,
	"Liliana Marie Prikler" <liliana.prikler@gmail.com>,
	宋文武 <iyzsong@envs.net>
Subject: [bug#66654] [PATCH v2] gnu: Add moonfish.
Date: Fri, 20 Oct 2023 22:17:28 -0300	[thread overview]
Message-ID: <9dfee67d9a604025ab595767a71c3fd080d0eff3.1697851048.git.zamfofex@twdb.moe> (raw)
In-Reply-To: <7e8a3994730ad4b020d1f45ae65fac4ff3504b66.1697827234.git.zamfofex@twdb.moe>

* gnu/packages/games.scm (moonfish): New variable.
---
 gnu/packages/games.scm | 50 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4d5b85248a..97515abc10 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -10409,6 +10409,56 @@ (define-public stockfish
       (home-page "https://stockfishchess.org/")
       (license license:gpl3+))))
 
+(define-public moonfish
+  (let ((commit "4f8829009e8c26e6a878261e0bc4c7e7617ef6b6")
+        (revision "1"))
+    (package
+      (name "moonfish")
+      (version (git-version "0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://git.sr.ht/~zamfofex/moonfish")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "1ksg42x9cyn3pbfryy9raqb355k47cqcisascpy157c3cgdr2z60"))
+                (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (inputs (list bearssl cjson))
+      (outputs '("out" "tools"))
+      (arguments
+       `(#:make-flags '(,(string-append "CC="
+                                        (cc-for-target)))
+         #:tests? #f ;no check target
+         #:phases (modify-phases %standard-phases
+                    (delete 'configure) ;no configure script
+                    (replace 'install
+                      ;; no 'install' target
+                      (lambda _
+                        (let* ((out (assoc-ref %outputs "out"))
+                               (tools (assoc-ref %outputs "tools"))
+                               (out-bin (string-append out "/bin"))
+                               (tools-bin (string-append tools "/bin"))
+                               (tool (string-append tools-bin "/moonfish-")))
+                          (mkdir-p out-bin)
+                          (mkdir-p tools-bin)
+                          (copy-file "moonfish"
+                                     (string-append out-bin "/moonfish"))
+                          (copy-file "play"
+                                     (string-append tool "play"))
+                          (copy-file "lichess"
+                                     (string-append tool "lichess"))
+                          (copy-file "analyse"
+                                     (string-append tool "analyse"))))))))
+      (home-page "https://git.sr.ht/~zamfofex/moonfish")
+      (synopsis "Simple chess engine written in C")
+      (description
+       "moonfish is a toy UCI chess engine made for fun.  It is inspired by
+sunfish, but is written in C rather than Python.  It also has TUI tools for
+using any UCI engine and also to connect UCI engines to Lichess.")
+      (license license:agpl3+))))
+
 (define-public barrage
   (package
     (name "barrage")

base-commit: 17954419aa25bf947f3351d82a11dc2f5472acaa
-- 
2.41.0





  reply	other threads:[~2023-10-21  1:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 18:40 [bug#66654] [PATCH] gnu: Add moonfish zamfofex
2023-10-21  1:17 ` zamfofex [this message]
2023-10-27 11:52 ` bug#66654: " Ricardo Wurmus

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9dfee67d9a604025ab595767a71c3fd080d0eff3.1697851048.git.zamfofex@twdb.moe \
    --to=zamfofex@twdb.moe \
    --cc=66654@debbugs.gnu.org \
    --cc=iyzsong@envs.net \
    --cc=liliana.prikler@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.