Message ID | 20210125212042.4358-1-kkebreau@posteo.net |
---|---|
State | Accepted |
Headers | show |
Series | [bug#46107,1/6] gnu: Add spglib. | expand |
Context | Check | Description |
---|---|---|
cbaines/submitting builds | success | |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
On Mon, Jan 25, 2021 at 04:20:42PM -0500, Kei Kebreau wrote: > * gnu/packages/chemistry.scm (spglib): New variable. Thanks! LGTM > + #:phases > + (modify-phases %standard-phases > + (replace 'bootstrap > + (lambda _ > + ;; These files are required by the Makefile, but not provided by > + ;; the developers. > + (for-each (lambda (file) (invoke "touch" file)) > + '("NEWS" "README" "AUTHORS")) > + (invoke "autoreconf" "-vi")))))) Can you file a bug upstream about this?
On Mon, 2021-01-25 at 17:17 -0500, Leo Famulari wrote: > On Mon, Jan 25, 2021 at 04:20:42PM -0500, Kei Kebreau wrote: > > * gnu/packages/chemistry.scm (spglib): New variable. > > Thanks! LGTM > > > + #:phases > > + (modify-phases %standard-phases > > + (replace 'bootstrap > > + (lambda _ > > + ;; These files are required by the Makefile, but not provided > > by > > + ;; the developers. > > + (for-each (lambda (file) (invoke "touch" file)) > > + '("NEWS" "README" "AUTHORS")) > > + (invoke "autoreconf" "-vi")))))) > > Can you file a bug upstream about this? On closer inspection, it seems that the developer is moving to make CMake the main build system. Using the CMake build system, I ran into a known [0] inconsistency [1] between the GNU and CMake build systems used by spglib. I've patched spglib to deal with this for now, with links added in the comments. [0]: https://github.com/spglib/spglib/issues/75 [1]: https://github.com/OpenChemistry/avogadroapp/issues/97
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index ddbf5ca098..7a9b3069fa 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -29,6 +29,7 @@ #:use-module (guix git-download) #:use-module (gnu packages) #:use-module (gnu packages algebra) + #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) @@ -464,3 +465,47 @@ chemical data. It's a collaborative project allowing anyone to search, convert, analyze, or store data from molecular modeling, chemistry, solid-state materials, biochemistry, or related areas.") (license license:gpl2))) + +(define-public spglib + (package + (name "spglib") + (version "1.16.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/spglib/spglib") + (commit (string-append "v" version)))) + (sha256 + (base32 "1kzc956m1pnazhz52vspqridlw72wd8x5l3dsilpdxl491aa2nws")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (arguments + '(#:test-target "check" + #:phases + (modify-phases %standard-phases + (replace 'bootstrap + (lambda _ + ;; These files are required by the Makefile, but not provided by + ;; the developers. + (for-each (lambda (file) (invoke "touch" file)) + '("NEWS" "README" "AUTHORS")) + (invoke "autoreconf" "-vi")))))) + (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 +symmetries written in C. Spglib can be used to: + +@enumerate +@item Find symmetry operations +@item Identify space-group type +@item Wyckoff position assignment +@item Refine crystal structure +@item Find a primitive cell +@item Search irreducible k-points +@end enumerate") + (license license:bsd-3)))