unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Bavier <bavier@posteo.net>
To: Antero Mejr <antero@mailbox.org>, 60266@debbugs.gnu.org
Subject: [bug#60266] [PATCH] gnu: Add form.
Date: Mon, 09 Jan 2023 18:01:33 +0000	[thread overview]
Message-ID: <92910915624cad61de6c1fc75cbe6ac2b8c6fe27.camel@posteo.net> (raw)
In-Reply-To: <20221223011551.32708-1-antero@mailbox.org>

[-- Attachment #1: Type: text/plain, Size: 5280 bytes --]

Hello Antero,

Thank you for the patch.  Sorry for the delayed reply, holidays and
such.  I was able to apply your patch and build a form package.

A few comments:

On Fri, 2022-12-23 at 01:15 +0000, Antero Mejr wrote:
> * gnu/packages/maths.scm (form): New variable.
> ---
> x86_64 only due to test failures on other platforms. Developers
> say other platforms are not "tier 1" supported:
> https://github.com/vermaseren/form/issues/426

This may be better as a comment near the `supported-systems` field,
along with a short summary of which tests fail on other systems.

> 
>  gnu/packages/maths.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
> 
> diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
> index 050450e12c..08ddd2ecb4 100644
> --- a/gnu/packages/maths.scm
> +++ b/gnu/packages/maths.scm
> @@ -8161,3 +8161,58 @@ (define-public optizelle
>  provided for applications written in C++ and Python.  Parallel
>  computation is supported via MPI.")
>      (license license:bsd-2))))
> +
> +(define-public form
> +  (let ((commit "28e15eaf0856a0a012795298d6a4b570e764a8b1")

This commit is downstream from the 4.3.0 release, so we should include
in a comment the rationale for not using just the 4.3.0 release
tarball.

> +        (revision "0"))
> +    (package
> +      (name "form")
> +      (version (git-version "4.3.0" revision commit))
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/vermaseren/form")
> +                      (commit commit)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32
> +                  "04i932lqwng2hmknvai1gmmb5j17rwrhlj11nr96w9bmj4sq736x"))
> +                (modules '((guix build utils)))
> +                (snippet #~(substitute* "check/examples.frm"
> +                             (("#pend_if valgrind\\?")
> +                              "#pend_if 0")))))

This snippet appears to be related to the specifics of this package
build?  E.g. if someone were to grab the source with `guix build -S
form`, they would not be able to have valgrind support, correct?  If
that's the case, perhaps it would be better to apply this substitution
in a build phase.

> +      (build-system gnu-build-system)
> +      (native-inputs (list autoconf automake doxygen ruby))
> +      (inputs (list bash openmpi))
> +      (arguments
> +       (list #:configure-flags #~(list "--enable-parform")

For some other maths packages that have both a serial and MPI versions,
we've usually provided two packages.  See e.g. `petsc` and `petsc-
openmpi`.  This can be useful if someone does not need a full MPI-
capable version of form, and the separation is easily achieved.

Also, I see the default compilation flags include `-march=native`,
which will most likely cause a problem with build farm substitutes or
`guix challenge`.  Could you figure out have to override these flags?
Guix usually assumes `SSE2` capabilities for x86_64 targets, iirc. 
Bonus points for enabling a "tunable" package (c.f. "Package
Transformation Options").

> +             #:phases #~(modify-phases %standard-phases
> +                          (add-after 'unpack 'fix-hardcoded-path
> +                            (lambda _
> +                              (substitute* "sources/extcmd.c"
> +                                (("/bin/sh")
> +                                 (string-append #$(this-package-input "bash")
> +                                                "/bin/sh")))))
> +                          (add-after 'build 'build-doxygen
> +                            (lambda _
> +                              (with-directory-excursion "doc/doxygen"
> +                                (invoke "make" "html"))))
> +                          (add-before 'check 'mpi-setup
> +                            #$%openmpi-setup)
> +                          (add-after 'install 'install-docs
> +                            (lambda _
> +                              (let ((doc (string-append #$output "/share/doc/"
> +                                                        #$name "-" #$version
> +                                                        "/html")))
> +                                (mkdir-p doc)
> +                                (copy-recursively "doc/doxygen/html" doc)))))))
> +      (home-page "https://www.nikhef.nl/~form/maindir/maindir.html")

Maybe we should use https://www.nikhef.nl/~form/ instead? This is the
URL specified in the included manpage.

> +      (synopsis "Symbolic manipulation system for very big expressions")
> +      (description
> +       "FORM is a symbolic manipulation system.  It reads symbolic expressions
> +from files and executes symbolic/algebraic transformations upon them.  The
> +answers are returned in a textual mathematical representation.  The size of the
> +considered expressions in FORM is only limited by the available disk space and
> +not by the available RAM.")
> +      (supported-systems '("x86_64-linux"))
> +      (license license:gpl3+))))

Thanks,
`~Eric


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 858 bytes --]

  reply	other threads:[~2023-01-09 18:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23  1:15 [bug#60266] [PATCH] gnu: Add form Antero Mejr via Guix-patches via
2023-01-09 18:01 ` Eric Bavier [this message]
2023-03-16  1:15   ` Antero Mejr via Guix-patches via
2023-03-16  5:23     ` Liliana Marie Prikler
2023-03-21 18:53       ` Antero Mejr via Guix-patches via
2023-03-22  4:54         ` bug#60266: " Eric Bavier
2023-02-19 22:42 ` [bug#60266] Algebra Andreas Enge
2023-03-16  1:07 ` [bug#60266] [PATCH v2 1/2] gnu: Add form Antero Mejr via Guix-patches via
2023-03-16  1:07   ` [bug#60266] [PATCH v2 2/2] gnu: Add parform Antero Mejr via Guix-patches via
2023-03-21 18:39 ` [bug#60266] [PATCH v3 1/2] gnu: Add form Antero Mejr via Guix-patches via
2023-03-21 18:39   ` [bug#60266] [PATCH v3 2/2] gnu: Add parform Antero Mejr 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=92910915624cad61de6c1fc75cbe6ac2b8c6fe27.camel@posteo.net \
    --to=bavier@posteo.net \
    --cc=60266@debbugs.gnu.org \
    --cc=antero@mailbox.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).