From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: David Elsing <david.elsing@posteo.net>, 58261@debbugs.gnu.org
Subject: [bug#58261] [PATCH v2 06/13] gnu: Add gemmi.
Date: Fri, 14 Oct 2022 23:32:44 +0200 [thread overview]
Message-ID: <1b01573caf32ea1bad10d7fb540b0ea3e7b0381c.camel@gmail.com> (raw)
In-Reply-To: <8635brbfs8.fsf@posteo.net>
Am Donnerstag, dem 13.10.2022 um 21:00 +0000 schrieb David Elsing:
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > Am Freitag, dem 07.10.2022 um 15:21 +0000 schrieb David Elsing:
> > > * gnu/packages/chemistry.scm (gemmi): New variable.
> > > ---
> > > gnu/packages/chemistry.scm | 118 +++++++++++
> > > .../patches/gemmi-fix-sajson-types.patch | 11 +
> > > .../sajson-for-gemmi-build-with-gcc10.patch | 45 ++++
> > > .../sajson-for-gemmi-numbers-as-strings.patch | 195
> > > ++++++++++++++++++
> > > 4 files changed, 369 insertions(+)
> > > create mode 100644 gnu/packages/patches/gemmi-fix-sajson-
> > > types.patch
> > > create mode 100644 gnu/packages/patches/sajson-for-gemmi-build-
> > > with-
> > > gcc10.patch
> > > create mode 100644 gnu/packages/patches/sajson-for-gemmi-
> > > numbers-as-
> > > strings.patch
> > >
> > > diff --git a/gnu/packages/chemistry.scm
> > > b/gnu/packages/chemistry.scm
> > > index c517610fe8..d8f1608a3a 100644
> > > --- a/gnu/packages/chemistry.scm
> > > +++ b/gnu/packages/chemistry.scm
> > > @@ -6,6 +6,7 @@
> > > ;;; Copyright © 2020 Björn Höfling
> > > <bjoern.hoefling@bjoernhoefling.de>
> > > ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
> > > ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
> > > +;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
> > > ;;;
> > > ;;; This file is part of GNU Guix.
> > > ;;;
> > > @@ -23,6 +24,7 @@
> > > ;;; along with GNU Guix. If not, see
> > > <http://www.gnu.org/licenses/>.
> > >
> > > (define-module (gnu packages chemistry)
> > > + #:use-module (guix gexp)
> > > #:use-module (guix packages)
> > > #:use-module (guix utils)
> > > #:use-module ((guix licenses) #:prefix license:)
> > > @@ -35,6 +37,7 @@ (define-module (gnu packages chemistry)
> > > #:use-module (gnu packages boost)
> > > #:use-module (gnu packages check)
> > > #:use-module (gnu packages compression)
> > > + #:use-module (gnu packages cpp)
> > > #:use-module (gnu packages documentation)
> > > #:use-module (gnu packages fontutils)
> > > #:use-module (gnu packages gl)
> > > @@ -50,8 +53,10 @@ (define-module (gnu packages chemistry)
> > > #:use-module (gnu packages qt)
> > > #:use-module (gnu packages serialization)
> > > #:use-module (gnu packages sphinx)
> > > + #:use-module (gnu packages stb)
> > > #:use-module (gnu packages xml)
> > > #:use-module (guix build-system cmake)
> > > + #:use-module (guix build-system copy)
> > > #:use-module (guix build-system gnu)
> > > #:use-module (guix build-system python))
> > >
> > > @@ -566,3 +571,116 @@ (define-public python-pymol
> > > used to prepare publication-quality figures, to share
> > > interactive
> > > results with
> > > your colleagues, or to generate pre-rendered animations.")
> > > (license license:bsd-3)))
> > > +
> > > +(define-public sajson-for-gemmi
> > > + (package/inherit sajson
> > > + (name "sajson-for-gemmi")
> > > + (source (origin
> > > + (inherit (package-source sajson))
> > > + (patches (search-patches
> > > + "sajson-for-gemmi-numbers-as-
> > > strings.patch"
> > > + "sajson-for-gemmi-build-with-
> > > gcc10.patch"))))
> > > + (arguments
> > > + (substitute-keyword-arguments (package-arguments sajson)
> > > + ((#:tests? _ #f) #f)
> > Don't forget the comment as to why they're disabled.
> > > + ((#:phases phases)
> > > + #~(modify-phases #$phases
> > > + (delete 'build)))))))
> > Why is the build deleted?
> It fails due to the change and only builds the tests anyway.
> >
> > Split here.
> > > +(define-public gemmi
> > > + (package
> > > + (name "gemmi")
> > > + (version "0.5.7")
> > > + (source (origin
> > > + (method git-fetch)
> > > + (uri (git-reference
> > > + (url
> > > "https://github.com/project-gemmi/gemmi")
> > > + (commit (string-append "v" version))))
> > > + (file-name (git-file-name name version))
> > > + (sha256
> > > + (base32
> > > +
> > > "00km5q726bslrw7xbfwb3f3mrsk19qbimfnl3hvr4wi1y3z8i18a"))
> > > + (patches
> > > + (search-patches "gemmi-fix-sajson-types.patch"))
> > > + (modules '((guix build utils)))
> > > + (snippet
> > > + '(begin
> > > + (delete-file-recursively
> > > "include/gemmi/third_party")
> > > + (delete-file-recursively "third_party")))))
> > > + (outputs '("out" "bin" "python"))
> > > + (build-system cmake-build-system)
> > > + (native-inputs
> > > + (list fast-float
> > > + optionparser
> > > + pegtl
> > > + pocketfft-cpp
> > > + pybind11
> > > + sajson-for-gemmi
> > > + stb-sprintf
> > > + tinydir))
> > > + (inputs (list python zlib))
> > > + (arguments
> > > + (list
> > > + #:configure-flags
> > > + #~(let* ((python-lib
> > > + (string-append
> > > + #$output:python "/lib/python"
> > > + #$(version-major+minor (package-version
> > > python))
> > > + "/site-packages")))
> > Note that python-build-system has a (site-packages) procedure.
> > Writing
> > the boilerplate to include it in the build shouldn't be much worse
> > in
> > terms of lines than what you're doing here.
> > > + (list "-DUSE_PYTHON=ON"
> > > + (string-append "-DPYTHON_INSTALL_DIR=" python-
> > > lib)))
> > > + #:phases
> > > + #~(modify-phases %standard-phases
> > > + (add-after 'unpack 'patch-includes
> > > + (lambda _
> > > + (substitute* "include/gemmi/sprintf.hpp"
> > > + (("<stb/stb_sprintf.h>") "<stb_sprintf.h>"))
> > > + (substitute* "include/gemmi/dirwalk.hpp"
> > > + (("\"third_party/tinydir.h\"") "<tinydir.h>"))
> > > + (substitute* "include/gemmi/cif.hpp"
> > > + (("\"third_party/tao/pegtl.hpp\"")
> > > "<tao/pegtl.hpp>"))
> > > + (substitute* "include/gemmi/json.hpp"
> > > + (("\"third_party/sajson.h\"") "<sajson.h>"))
> > > + (substitute* "python/gemmi.cpp"
> > > +
> > > (("\"gemmi/third_party/tao/pegtl/parse_error.hpp\"")
> > > + "<tao/pegtl/parse_error.hpp>"))
> > > + (substitute* '("include/gemmi/atof.hpp"
> > > + "include/gemmi/numb.hpp")
> > > + (("\"third_party/fast_float.h\"")
> > > + "<fast_float/fast_float.h>"))
> > > + (substitute* "include/gemmi/fourier.hpp"
> > > + (("\"third_party/pocketfft_hdronly.h\"")
> > > + "<pocketfft_hdronly.h>"))))
> > I'd collect all the files into a (list ...) and then write out the
> > substitutes.
> Is it preferred to put list elements on separate lines (also in
> inputs)?
>
Depends on the length, but in this case I'd say yes.
However, if things neatly fit into one line, you don't have to add a
new line.
Cheers
next prev parent reply other threads:[~2022-10-14 21:33 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-02 22:55 [bug#58261] [PATCH 00/11] Add rdkit David Elsing
2022-10-03 0:19 ` [bug#58261] [PATCH 01/11] gnu: Add fast-float David Elsing
2022-10-04 6:57 ` Liliana Marie Prikler via Guix-patches via
2022-10-07 15:08 ` David Elsing
2022-10-03 0:19 ` [bug#58261] [PATCH 02/11] gnu: Add pocketfft David Elsing
2022-10-04 7:09 ` Liliana Marie Prikler
2022-10-07 15:10 ` David Elsing
2022-10-03 0:19 ` [bug#58261] [PATCH 03/11] gnu: Add sajson David Elsing
2022-10-04 7:22 ` Liliana Marie Prikler
2022-10-07 15:10 ` David Elsing
2022-10-03 0:19 ` [bug#58261] [PATCH 04/11] gnu: Add tinydir David Elsing
2022-10-04 7:27 ` Liliana Marie Prikler
2022-10-07 15:11 ` David Elsing
2022-10-07 15:13 ` Liliana Marie Prikler
2022-10-03 0:19 ` [bug#58261] [PATCH 05/11] gnu: Add optionparser David Elsing
2022-10-04 7:42 ` Liliana Marie Prikler
2022-10-07 15:11 ` David Elsing
2022-10-03 0:19 ` [bug#58261] [PATCH 06/11] gnu: Add gemmi David Elsing
2022-10-04 7:49 ` Liliana Marie Prikler
2022-10-07 15:11 ` David Elsing
2022-10-07 15:17 ` Liliana Marie Prikler
2022-10-03 0:19 ` [bug#58261] [PATCH 07/11] gnu: Add freesasa David Elsing
2022-10-04 8:02 ` Liliana Marie Prikler
2022-10-07 15:12 ` David Elsing
2022-10-07 15:19 ` Liliana Marie Prikler
2022-10-03 0:19 ` [bug#58261] [PATCH 08/11] gnu: Add maeparser David Elsing
2022-10-03 0:19 ` [bug#58261] [PATCH 09/11] gnu: Add coordgenlibs David Elsing
2022-10-03 0:19 ` [bug#58261] [PATCH 10/11] gnu: Add yaehmop-tightbind David Elsing
2022-10-04 7:54 ` Liliana Marie Prikler
2022-10-07 15:12 ` David Elsing
2022-10-07 15:25 ` Liliana Marie Prikler
2022-10-03 0:19 ` [bug#58261] [PATCH 11/11] gnu: Add rdkit David Elsing
2022-10-04 8:13 ` Liliana Marie Prikler
2022-10-07 15:12 ` David Elsing
2022-10-07 15:29 ` Liliana Marie Prikler
2022-10-07 15:21 ` [bug#58261] [PATCH v2 00/13] Add rdkit v2 David Elsing
2022-10-09 10:02 ` Liliana Marie Prikler
2022-10-13 20:58 ` David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 00/15] Add rdkit v3 David Elsing
2022-10-15 14:37 ` bug#58261: " Liliana Marie Prikler
2022-10-17 9:55 ` [bug#58261] " David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 01/15] gnu: Add fast-float David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 02/15] gnu: Add pocketfft-cpp David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 03/15] gnu: Add sajson David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 04/15] gnu: Add cbehave David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 05/15] gnu: Add tinydir David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 06/15] gnu: Add optionparser David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 07/15] gnu: Add sajson-for-gemmi David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 08/15] gnu: Add gemmi David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 09/15] gnu: Add freesasa David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 10/15] gnu: Add maeparser David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 11/15] gnu: Add coordgenlibs David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 12/15] gnu: Add yaehmop David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 13/15] gnu: Add avalon-toolkit David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 14/15] gnu: Add ringdecomposerlib David Elsing
2022-10-13 21:04 ` [bug#58261] [PATCH v3 15/15] gnu: Add rdkit David Elsing
2022-10-07 15:21 ` [bug#58261] [PATCH v2 01/13] gnu: Add fast-float David Elsing
2022-10-09 10:04 ` Liliana Marie Prikler
2022-10-07 15:21 ` [bug#58261] [PATCH v2 02/13] gnu: Add pocketfft David Elsing
2022-10-09 11:42 ` Liliana Marie Prikler
2022-10-07 15:21 ` [bug#58261] [PATCH v2 03/13] gnu: Add sajson David Elsing
2022-10-09 11:46 ` Liliana Marie Prikler
2022-10-13 20:59 ` David Elsing
2022-10-14 21:30 ` Liliana Marie Prikler
2022-10-07 15:21 ` [bug#58261] [PATCH v2 04/13] gnu: Add tinydir David Elsing
2022-10-09 11:48 ` Liliana Marie Prikler
2022-10-07 15:21 ` [bug#58261] [PATCH v2 05/13] gnu: Add optionparser David Elsing
2022-10-07 15:21 ` [bug#58261] [PATCH v2 06/13] gnu: Add gemmi David Elsing
2022-10-09 11:54 ` Liliana Marie Prikler
2022-10-13 21:00 ` David Elsing
2022-10-14 21:32 ` Liliana Marie Prikler [this message]
2022-10-07 15:21 ` [bug#58261] [PATCH v2 07/13] gnu: Add freesasa David Elsing
2022-10-07 15:21 ` [bug#58261] [PATCH v2 08/13] gnu: Add maeparser David Elsing
2022-10-07 15:21 ` [bug#58261] [PATCH v2 09/13] gnu: Add coordgenlibs David Elsing
2022-10-09 11:56 ` Liliana Marie Prikler
2022-10-13 21:00 ` David Elsing
2022-10-07 15:21 ` [bug#58261] [PATCH v2 10/13] gnu: Add yaehmop-tightbind David Elsing
2022-10-09 12:02 ` Liliana Marie Prikler
2022-10-13 21:00 ` David Elsing
2022-10-14 21:33 ` Liliana Marie Prikler
2022-10-07 15:21 ` [bug#58261] [PATCH v2 11/13] gnu: Add avalontoolkit David Elsing
2022-10-09 12:06 ` Liliana Marie Prikler
2022-10-13 21:01 ` David Elsing
2022-10-07 15:22 ` [bug#58261] [PATCH v2 12/13] gnu: Add ringdecomposerlib David Elsing
2022-10-07 15:22 ` [bug#58261] [PATCH v2 13/13] gnu: Add rdkit David Elsing
2022-10-09 12:12 ` Liliana Marie Prikler
2022-10-13 21:01 ` David Elsing
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=1b01573caf32ea1bad10d7fb540b0ea3e7b0381c.camel@gmail.com \
--to=liliana.prikler@gmail.com \
--cc=58261@debbugs.gnu.org \
--cc=david.elsing@posteo.net \
/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.