Subject: [bug#77590] [PATCH v2 2/3] gnu: Add hdf5-examples.

From: David Elsing <[email-masked]>
Date: Mon, 7 Apr 2025 14:24:39 +0000

* gnu/packages/maths.scm (hdf5-examples): New variable.
---
 gnu/packages/maths.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d11fff3bc5..6d7466774d 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2016,6 +2016,20 @@ (define-public hdf5
     (license (license:x11-style
               "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html"))))
 
+;; This package builds and tests the examples, but has empty output.
+(define-public hdf5-examples
+  (package/inherit hdf5
+    (name "hdf5-examples")
+    (arguments
+     (substitute-keyword-arguments (package-arguments hdf5)
+       ((#:phases _ #f)
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (chdir "HDF5Examples")))))))
+    (inputs (list hdf5 zlib))
+    (native-inputs (list autoconf-2.71 automake gfortran))))
+
 ;; Keep this in sync with the current hdf5 package.
 (define-public hdf-java
   (package
-- 
2.48.1