Commit Message
Since we're rebuilding avogadro2, we might as well update it to the new version.
Btw etc/committer.scm is broken with this patch so the merger would have to properly format the commits or fix the committer.
From 8a4aec3970b8eb31410933b77cd92937dca81309 Mon Sep 17 00:00:00 2001
Message-ID: <8a4aec3970b8eb31410933b77cd92937dca81309.1741272703.git.jakob.kirsch@web.de>
From: Jakob Kirsch <jakob.kirsch@web.de>
Date: Thu, 6 Mar 2025 15:51:33 +0100
Subject: [PATCH v1] Update avogadro2 to 1.100
Change-Id: Ia97823f9950a587b52b274b17338102cf4340e71
---
gnu/packages/chemistry.scm | 217 +++++++++++++++++++++++++++++--------
1 file changed, 170 insertions(+), 47 deletions(-)
base-commit: f2229c2afdb32ddba46bce6f37aba812af39eec5
--
2.48.1
@@ -7,6 +7,7 @@
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2022, 2023, 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2025 Jakob Kirsch <jakob.kirsch@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -67,13 +68,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 +144,39 @@ (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))
+ (native-inputs (list eigen
+ mmtf-cpp
+ googletest
+ pkg-config
+ pybind11
+ avogadro-molecules
+ avogadro-crystals
+ avogadro-fragments))
+ (inputs (list glew
+ libarchive
+ libmsym
+ molequeue
+ python
+ spglib
+ qtbase-5
+ qtsvg-5))
(arguments
- '(#:configure-flags (list "-DENABLE_TESTING=ON"
- (string-append "-DSPGLIB_INCLUDE_DIR="
- (assoc-ref %build-inputs "spglib")
- "/include"))))
+ (list
+ #:configure-flags
+ #~(list "-DENABLE_TESTING=ON"
+ (string-append "-DSPGLIB_INCLUDE_DIR="
+ (assoc-ref %build-inputs "spglib") "/include"))
+ #: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 +185,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 +216,28 @@ (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))
;; 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")))))))))
(home-page "https://www.openchemistry.org/projects/avogadro2/")
(synopsis "Advanced molecule editor")
(description
@@ -481,7 +586,7 @@ (define-public openbabel
(define-public spglib
(package
(name "spglib")
- (version "1.16.0")
+ (version "2.5.0")
(source
(origin
(method git-fetch)
@@ -489,26 +594,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