Subject: [bug#64504] [PATCH] gnu: Add unsio.

From: Andreas Enge <[email-masked]>
Date: Tue, 8 Aug 2023 11:29:34 +0200

Hello,

thanks for the patch! I tried to remove the marketing speech out of the
description. For the #:build-type, the default value (release with debug
information) also works and results in a package of the same size. Is there
a reason to change it? Modified patch attached.

I can also compile the package without the configure flags, are they
useful?

In the end dynamic and static libraries end up in a directory lib64/.
Should this not be lib/?

And there are lots of warnings about 34 bit shifts in a 32 bit type.
But I suppose you tested that the library works.

Andreas

>From f5401b0abbe58aa473738dc58d541e2bece9db65 Mon Sep 17 00:00:00 2001
Message-ID: <[email-masked]>
From: Sharlatan Hellseher <[email-masked]>
Date: Thu, 6 Jul 2023 23:13:05 +0100
Subject: [PATCH] gnu: Add unsio.

* gnu/packages/astronomy.scm (unsio): New variable.

Co-Authored-By: Iliya Tikhonenko <[email-masked]>
Signed-off-by: Andreas Enge <[email-masked]>
---
 gnu/packages/astronomy.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index e5c318c8bf..7e047d4ad7 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2021, 2022 Vinicius Monego <[email-masked]>
 ;;; Copyright © 2021 Greg Hogan <[email-masked]>
 ;;; Copyright © 2021 Foo Chuan Wei <[email-masked]>
+;;; Copyright © 2023 Iliya Tikhonenko <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -75,6 +76,7 @@ (define-module (gnu packages astronomy)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages time)
@@ -3951,3 +3953,32 @@ (define-public python-wiimatch
 for optimal @code{matching} of weighted N-dimensional image intensity data
 using (multivariate) polynomials.")
     (license license:bsd-3)))
+
+(define-public unsio
+  ;; There is no versioned tag, use the latest commit.
+  (let ((commit "25e52468298e1194c9726ef5dba9d5fbb46870f5")
+        (revision "0"))
+    (package
+      (name "unsio")
+      (version (git-version "1.3.3" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://gitlab.lam.fr/infrastructure/unsio")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "110i2p5608zhh5w3pf3b5r2651hykw2ayspgq6vpqsffhya1p170"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list #:tests? #f ;No tests
+             #:configure-flags #~(list "-DCMAKE_CXX_STANDARD=14")))
+      (inputs (list gfortran hdf5 perl sqlite zlib))
+      (home-page "https://projets.lam.fr/projects/unsio/wiki")
+      (synopsis "Input and output routines for n-body file formats")
+      (description
+       "@acronym{UNSIO, Universal Nbody Snapshot Input Output} provides
+an API for performing input and output operations on different kinds of
+n-body file formats (nemo, Gadget binaries 1 and 2, Gadget hdf5, Ramses).")
+      (license license:cecill))))

base-commit: f19736e62f9ab5fba0ac5fe184a221c2a5d374c6
-- 
2.41.0