[bug#76728] gnu: avogadro2: update to 1.100.0
Commit Message
I fixed all the issues. It's good to merge now.
From d37b05f6d07df4bdb87ad4d210715c725ba909e5 Mon Sep 17 00:00:00 2001
Message-ID: <d37b05f6d07df4bdb87ad4d210715c725ba909e5.1744306039.git.jakob.kirsch@web.de>
From: Jakob Kirsch <jakob.kirsch@web.de>
Date: Thu, 10 Apr 2025 19:24:23 +0200
Subject: [PATCH] gnu: avogadro2: update to 1.100.0
* gnu/packages/chemistry.scm (avogadro-molecules): New variable.
(avogadro-crystals): New variable.
(avogadro-fragments): New variable.
(avogadrolibs): Update to 1.100.0
(avogadro-i18n): New variable.
(avogadro2): Update to 1.100.0
(spglib): Update to 2.5.0
Change-Id: Ie6a22f21aca770d628729bd514acbea1185d89a8
---
gnu/packages/chemistry.scm | 215 ++++++++++++++++++++++++++++---------
1 file changed, 167 insertions(+), 48 deletions(-)
base-commit: 6036f1f3053bc9b4f0411b5e8aeaab5bd7f4ec7b
--
2.49.0
Comments
Jakob Kirsch via Guix-patches via <guix-patches@gnu.org> writes:
> I fixed all the issues. It's good to merge now.
>
> [2. text/plain; 0001-gnu-avogadro2-update-to-1.100.0.patch]...
It would be clearer to add each new package in a separate commit/patch
rather than one big commit. Alternatively, I'm unsure if these new
packages should exist, why would someone install avogadro-fragments for
example? If they just exist to be symlinked in avogadrolibs, you can
directly pass the origin records you're using as sources for the new
packages as inputs.
Regarding the origin changes to spglib, doing the substitute* operations
as a package build phase is preferable if doing them on the source isn't
required since that results in one less derivation.
Thanks,
Chris
Yeah makes sense, I'll change the things and send a patch.
@@ -67,13 +67,75 @@ (define-module (gnu packages chemistry)
#:use-module (gnu packages web)
#: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))
+(define-public avogadro-molecules
+ (package
+ (name "avogadro-molecules")
+ (version "1.100")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/openchemistry/molecules")
+ (commit "8a37883")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "00mfx0bwmqazbiklrvaijjd5n4wa5lp3z73291ihm78q0v9dzhl4"))))
+ (build-system copy-build-system)
+ (home-page "https://two.avogadro.cc/")
+ (synopsis "Common molecule fragments for visualization in Avogadro")
+ (description
+ "Common molecule fragments including a variety of organic functional groups.")
+ (license license:bsd-3)))
+
+(define-public avogadro-crystals
+ (package
+ (name "avogadro-crystals")
+ (version "1.100")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/openchemistry/crystals")
+ (commit "28404bd")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0kcz99q5nfl2v2qmm9cqnbb2c2qqzw79vsnv557i7x64bxsxrw1m"))))
+ (build-system copy-build-system)
+ (home-page "https://two.avogadro.cc/")
+ (synopsis
+ "Crystallographic files of common materials, elements, oxides, for visualization in Avogadro")
+ (description
+ "Crystal structures of over 500 common materials, elements, oxides.")
+ (license license:bsd-3)))
+
+(define-public avogadro-fragments
+ (package
+ (name "avogadro-fragments")
+ (version "1.100")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/openchemistry/fragments")
+ (commit "c4943b5")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17l6qmkc25wb0nvic708l25fxiy89b3vfs0x5d40qcnn27bid32n"))))
+ (build-system copy-build-system)
+ (home-page "https://two.avogadro.cc/")
+ (synopsis "Molecular fragments for Avogadro")
+ (description
+ "Molecular fragments and inorganic ligands for rapidly building structures")
+ (license license:bsd-3)))
+
(define-public avogadrolibs
(package
(name "avogadrolibs")
- (version "1.93.0")
+ (version "1.100.0")
(source
(origin
(method git-fetch)
@@ -81,28 +143,34 @@ (define-public avogadrolibs
(url "https://github.com/OpenChemistry/avogadrolibs")
(commit version)))
(sha256
- (base32 "1xivga626n5acnmwmym8svl0pdri8hkp59czf04ri2zflnviyh39"))
+ (base32 "1l9bp3ba8yx9mk2in5v375jzi1w4y7l1xl37xqv869810drgjffc"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
- (native-inputs
- (list eigen
- mmtf-cpp
- googletest
- pkg-config
- pybind11))
- (inputs
- (list glew
- libarchive
- libmsym
- molequeue
- python
- spglib
- qtbase-5))
- (arguments
- '(#:configure-flags (list "-DENABLE_TESTING=ON"
- (string-append "-DSPGLIB_INCLUDE_DIR="
- (assoc-ref %build-inputs "spglib")
- "/include"))))
+ (native-inputs (list eigen mmtf-cpp googletest pkg-config pybind11))
+ (inputs (list glew
+ libarchive
+ libmsym
+ molequeue
+ python
+ spglib
+ qtbase-5
+ qtsvg-5
+ avogadro-molecules
+ avogadro-crystals
+ avogadro-fragments))
+ (arguments
+
+ (list
+ #:configure-flags
+ #~(list "-DENABLE_TESTING=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'symlink
+ (lambda _
+ (begin
+ (symlink #$avogadro-molecules "../molecules")
+ (symlink #$avogadro-crystals "../crystals")
+ (symlink #$avogadro-fragments "../fragments")))))))
(home-page "https://www.openchemistry.org/projects/avogadro2/")
(synopsis "Libraries for chemistry, bioinformatics, and related areas")
(description
@@ -111,10 +179,30 @@ (define-public avogadrolibs
bioinformatics, materials science, and related areas.")
(license license:bsd-3)))
+(define-public avogadro-i18n
+ (package
+ (name "avogadro-i18n")
+ (version "1.100")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/openchemistry/avogadro-i18n")
+ (commit "07bee85")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1vhjh0gilmm90269isrkvyzwwh1cj3bwcxls394psadw1a89mk14"))))
+ (build-system copy-build-system)
+ (home-page "https://two.avogadro.cc/")
+ (synopsis "Translations for Avogadro app and libraries")
+ (description
+ "Translations for the Avogadro app and libraries. Contributions and edits are always welcome through Weblate.")
+ (license license:bsd-3)))
+
(define-public avogadro2
(package
(name "avogadro2")
- (version "1.93.0")
+ (version "1.100.0")
(source
(origin
(method git-fetch)
@@ -122,17 +210,30 @@ (define-public avogadro2
(url "https://github.com/OpenChemistry/avogadroapp")
(commit version)))
(sha256
- (base32
- "1z3pjlwja778a1dmvx9aqz2hlw5q9g3kqxhm9slz08452600jsv7"))
+ (base32 "19cd5aqvcw6xj0x1kmzmxl0vrnbhk5ymnl9p2p4d9504ma5k6aim"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
- (native-inputs
- (list eigen pkg-config))
- (inputs
- (list avogadrolibs hdf5 molequeue qtbase-5))
+ (native-inputs (list eigen pkg-config avogadro-i18n))
+ (inputs (list avogadrolibs hdf5 molequeue qtbase-5 qtsvg-5))
;; TODO: Enable tests with "-DENABLE_TESTING" configure flag.
(arguments
- '(#:tests? #f))
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'symlink
+ (lambda _
+ (begin
+ (symlink #$avogadro-i18n "../avogadro-i18n"))))
+ (add-after 'install 'wrap-program
+ (lambda _
+ (wrap-program (string-append #$output "/bin/avogadro2")
+ (list "PATH"
+ 'suffix
+ (list (string-append #$openbabel "/bin")))
+ (list "QT_PLUGIN_PATH"
+ 'suffix
+ (list (string-append #$qtsvg-5 "/lib/qt5/plugins")))))))))
(home-page "https://www.openchemistry.org/projects/avogadro2/")
(synopsis "Advanced molecule editor")
(description
@@ -477,7 +578,7 @@ (define-public openbabel
(define-public spglib
(package
(name "spglib")
- (version "1.16.0")
+ (version "2.5.0")
(source
(origin
(method git-fetch)
@@ -485,26 +586,44 @@ (define-public spglib
(url "https://github.com/spglib/spglib")
(commit (string-append "v" version))))
(sha256
- (base32 "1kzc956m1pnazhz52vspqridlw72wd8x5l3dsilpdxl491aa2nws"))
- (file-name (git-file-name name version))))
+ (base32 "0x5igrqwx7r2shysmi9sqcjg4hpb7hba3ddlwg05z6c57a3ifbqc"))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet #~(begin
+ (substitute* "CMakeLists.txt"
+ (("include\\(cmake/DynamicVersion.cmake\\)")
+ "")
+ (("dynamic_version.*")
+ "")
+ (("PROJECT_PREFIX.*")
+ "")
+ (("FALLBACK_VERSION.*")
+ "set (PROJECT_VERSION 2.5.0")
+ (("\\$\\{PROJECT_VERSION_FULL\\}")
+ "2.5.0")
+ (("\\$\\{GIT_COMMIT\\}")
+ "\"\""))
+ (substitute* "src/CMakeLists.txt"
+ ((".*Spglib_GitHash.*")
+ ""))))))
(build-system cmake-build-system)
(arguments
- '(#:test-target "check"
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-header-install-dir
- (lambda _
- ;; As of the writing of this package, CMake and GNU build systems
- ;; install the header to two different location. This patch makes
- ;; the CMake build system's choice of header directory compatible
- ;; with the GNU build system's choice and with what avogadrolibs
- ;; expects.
- ;; See https://github.com/spglib/spglib/issues/75 and the relevant
- ;; part of https://github.com/OpenChemistry/avogadroapp/issues/97.
- (substitute* "CMakeLists.txt"
- (("\\$\\{CMAKE_INSTALL_INCLUDEDIR\\}" include-dir)
- (string-append include-dir "/spglib")))
- #t)))))
+ '(#:tests? #f
+ #:configure-flags '("-DSPGLIB_WITH_TESTS=OFF")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-header-install-dir
+ (lambda _
+ ;; As of the writing of this package, CMake and GNU build systems
+ ;; install the header to two different location. This patch makes
+ ;; the CMake build system's choice of header directory compatible
+ ;; with the GNU build system's choice and with what avogadrolibs
+ ;; expects.
+ ;; See https://github.com/spglib/spglib/issues/75 and the relevant
+ ;; part of https://github.com/OpenChemistry/avogadroapp/issues/97.
+ (substitute* "CMakeLists.txt"
+ (("\\$\\{CMAKE_INSTALL_INCLUDEDIR\\}" include-dir)
+ (string-append include-dir "/spglib")))
+ #t)))))
(home-page "https://spglib.github.io/spglib/index.html")
(synopsis "Library for crystal symmetry search")
(description "Spglib is a library for finding and handling crystal