unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: elaexuotee--- via Guix-patches via <guix-patches@gnu.org>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: "Jakub Kądziołka" <kuba@kadziolka.net>, 40815@debbugs.gnu.org
Subject: [bug#40815] gnu: Add metamath
Date: Wed, 24 Jun 2020 10:14:39 +0900	[thread overview]
Message-ID: <31H3GR8EOYWGZ.2EEY2GE3LMLRZ@wilsonb.com> (raw)
In-Reply-To: <87d06eraaf.fsf@nicolasgoaziou.fr>


[-- Attachment #1.1: Type: text/plain, Size: 152 bytes --]

Oops. Looks like my previous emais's patch was for the version that *didn't*
comment out the "doc" output. The one included here should be correct.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-metamath.patch --]
[-- Type: text/x-patch, Size: 6147 bytes --]

From 74db38db11a7e107119362983e388cfb5ead3431 Mon Sep 17 00:00:00 2001
From: "B. Wilson" <elaexuotee@wilsonb.com>
Date: Mon, 11 May 2020 20:10:48 +0900
Subject: [PATCH] gnu: Add metamath.
To: guix-patches@gnu.org

* gnu/packages/maths.scm (metamath): New variable.
---
 gnu/packages/maths.scm | 97 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 45d699e39c..e6f4cbe980 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -38,6 +38,7 @@
 ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
+;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5686,3 +5687,99 @@ and conversions, physical constants, symbolic calculations (including
 integrals and equations), arbitrary precision, uncertainity propagation,
 interval arithmetic, plotting.")
     (license license:gpl2+)))
+
+(define-public metamath
+  ;; Upstream pushed a commit on top of v0.182 that fixes a bug in Makefile.am.
+  ;; Using this commit lets us avoid directly including the patch here.  In the
+  ;; next version bump, we should be able to replace this and directly use the
+  ;; version tag.
+  (let ((commit "5df616efe4119ff88daf77e7041d45b6fa39c578")
+        (revision "0")
+        (book-name "metamath-book")
+        (book-version "second_edition"))
+    (package
+      (name "metamath")
+      (version (git-version "0.182" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/metamath/metamath-exe.git")
+               (commit commit)))
+         (sha256
+          (base32 "0amjdgy42c7jypf6sz98iczlxcyl9bqx67ws1q8w2zdqk2izsyjp"))
+         (file-name (git-file-name name version))))
+      ;; FIXME: Unfortunately, there seems to be a problem with
+      ;; texlive-amsfonts that prevents us from typsetting the "doc" output
+      ;; pdf.  Once fixed, this along with the commented out sections below,
+      ;; should be enabled.
+      ; (outputs '("out" "doc"))
+      (build-system gnu-build-system)
+      ;; FIXME: Enable for "doc" output.  See previous comment.
+      ; (inputs
+      ;  `((,book-name
+      ;     ,(origin
+      ;        (method git-fetch)
+      ;        (uri (git-reference
+      ;              (url "https://github.com/metamath/metamath-book.git")
+      ;              (commit book-version)))
+      ;        (sha256
+      ;         (base32
+      ;          "1kk9nfhs0h8qccpxp1qh072bpfis7h05rlnz3qn1z641d9i4ryyq"))
+      ;        (file-name (git-file-name book-name book-version))))))
+      (native-inputs `(("autoconf" ,autoconf)
+                       ("automake" ,automake)
+                       ;; FIXME: Required inputs to build the "doc" output.
+                       ;; See above comment.
+                       ; ("texlive" ,(texlive-union
+                       ;              (list texlive-amsfonts
+                       ;                    texlive-bibtex
+                       ;                    texlive-breqn
+                       ;                    texlive-makecell
+                       ;                    texlive-microtype
+                       ;                    texlive-tabu
+                       ;                    texlive-latex-anysize
+                       ;                    texlive-latex-hyperref
+                       ;                    texlive-latex-needspace
+                       ;                    texlive-latex-tools)))
+                       ))
+      ;; FIXME: Arguments to build the "doc" output.  See above comment.
+      ; (arguments
+      ;  `(#:phases
+      ;    (let ((book-builddir "metamath-book-second_edition"))
+      ;      (modify-phases %standard-phases
+      ;        (add-after 'unpack 'unpack-doc
+      ;          (lambda* (#:key inputs #:allow-other-keys)
+      ;            (let ((book (assoc-ref inputs ,book-name)))
+      ;              (mkdir-p book-builddir)
+      ;              (copy-recursively book book-builddir))))
+      ;        (add-after 'build 'build-doc
+      ;          (lambda _
+      ;            (with-directory-excursion book-builddir
+      ;              (invoke "touch" "metamath.ind")
+      ;              (invoke "pdflatex" "metamath")
+      ;              (invoke "pdflatex" "metamath")
+      ;              (invoke "bibtex" "metamath")
+      ;              (invoke "makeindex" "metamath")
+      ;              (invoke "pdflatex" "metamath")
+      ;              (invoke "pdflatex" "metamath"))))
+      ;        (add-after 'build-doc 'install-doc
+      ;          (lambda* (#:key outputs #:allow-other-keys)
+      ;            (let* ((pkg (strip-store-file-name (assoc-ref outputs "out")))
+      ;                   (out-doc (assoc-ref outputs "doc")))
+      ;              (install-file (string-append book-builddir "/metamath.pdf")
+      ;                            (string-append out-doc "/share/doc/" pkg))
+      ;              #t)))))))
+      (home-page "http://us.metamath.org/")
+      (synopsis "Proof verifier based on a minimalistic formalism")
+      (description "Metamath is a tiny formal language and that can express
+theorems in abstract mathematics, with an accompyaning @code{metamath}
+executable that verifies databases of these proofs.  There is a public
+database, @url{https://github.com/metamath/set.mm, set.mm}, implementing
+first-order logic and Zermelo-Frenkel set theory with Choice, along with a
+large swath of associated, high-level theorems, e.g.@: the Fundamental Theorem
+of Arithmetic, the Cauchy-Schwarz Inequality, Striling's Formula, etc.  See the
+Metamath book.")
+    ;; FIXME: The "doc" output requires license:cc0.  See above comment.
+    ; (license '(,license:gpl2+ ,license:cc0)))))
+    (license license:gpl2+))))
-- 
2.27.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  parent reply	other threads:[~2020-06-24  1:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 11:48 [bug#40815] gnu: Add metamath B. Wilson via Guix-patches via
2020-04-26 17:29 ` Jakub Kądziołka
2020-04-27  4:21   ` x--- via Guix-patches via
2020-04-27 12:12     ` Jakub Kądziołka
2020-05-11 11:25       ` B. Wilson via Guix-patches via
2020-05-11 14:05         ` B. Wilson via Guix-patches via
2020-06-04 17:49           ` Nicolas Goaziou
2020-06-23 11:32             ` elaexuotee--- via Guix-patches via
2020-06-26  7:19               ` Nicolas Goaziou
2020-06-26  8:46                 ` elaexuotee--- via Guix-patches via
2020-06-28 20:12                   ` Nicolas Goaziou
2020-06-29  7:09                     ` elaexuotee--- via Guix-patches via
2020-07-01 11:02                       ` bug#40815: " Nicolas Goaziou
2020-07-01 23:53                         ` [bug#40815] " elaexuotee--- via Guix-patches via
2020-06-24  1:14             ` elaexuotee--- via Guix-patches via [this message]
2020-05-13  7:25 ` elaexuotee--- via Guix-patches via

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=31H3GR8EOYWGZ.2EEY2GE3LMLRZ@wilsonb.com \
    --to=guix-patches@gnu.org \
    --cc=40815@debbugs.gnu.org \
    --cc=elaexuotee@wilsonb.com \
    --cc=kuba@kadziolka.net \
    --cc=mail@nicolasgoaziou.fr \
    /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).