Subject: [bug#79099] [PATCH 17/34] gnu/packages/h*.scm: Use make-git-version.

From: Nicolas Graves <[email-masked]>
Date: Sat, 26 Jul 2025 04:39:23 +0200

find gnu/packages/ -type f -name "h*.scm" -exec sed -i 's/(git-version /(make-git-version /g' {} +

Then manually checked the potential usage of `version` on the build-side.
---
 gnu/packages/hardware.scm          | 10 +++++-----
 gnu/packages/haskell-apps.scm      |  5 +++--
 gnu/packages/haskell-xyz.scm       |  2 +-
 gnu/packages/heads.scm             |  2 +-
 gnu/packages/high-availability.scm |  2 +-
 gnu/packages/hurd.scm              |  4 ++--
 6 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index ed386371ce8..72ee0dc200a 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -128,7 +128,7 @@ (define-public envytools
         (revision "1"))
     (package
       (name "envytools")
-      (version (git-version "0.1" revision commit))
+      (version (make-git-version "0.1" revision commit))
       (home-page "https://github.com/envytools/envytools")
       (source (origin
                 (method git-fetch)
@@ -628,7 +628,7 @@ (define-public edid-decode
         (revision "1"))
     (package
       (name "edid-decode")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -665,7 +665,7 @@ (define-public h-client
         (revision "1"))
     (package
       (name "h-client")
-      (version (git-version "0.0a0" revision commit))
+      (version (make-git-version "0.0a0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -787,7 +787,7 @@ (define-public i7z
         (commit "1a41ff13db747e962456ddbb5ccb2b7fc43ca0cb"))
     (package
       (name "i7z")
-      (version (git-version "0.28" revision commit))
+      (version (make-git-version "0.28" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1247,7 +1247,7 @@ (define-public rkdeveloptool
         (revision "0"))
     (package
       (name "rkdeveloptool")
-      (version (git-version "1.3" revision commit))
+      (version (make-git-version "1.3" revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index e6265090673..384285f5a93 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -630,7 +630,7 @@ (define-public kmonad
         (revision "1"))
     (package
       (name "kmonad")
-      (version (git-version "0.4.2" revision commit))
+      (version (make-git-version "0.4.2" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -666,7 +666,8 @@ (define-public kmonad
            (add-after 'install-udev-rules 'install-documentation
              (lambda* (#:key outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
-                      (doc (string-append out "/share/doc/kmonad-" ,version)))
+                      (doc (string-append out "/share/doc/kmonad-"
+                                          ,(package-version this-package))))
                  (install-file "README.md" doc)
                  (copy-recursively "doc" doc)
                  (copy-recursively "keymap" (string-append doc "/keymap"))
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 6b8cce3cfc4..e75e16485cb 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -10103,7 +10103,7 @@ (define-public ghc-reflex-sdl2
         (revision "1"))
     (package
       (name "ghc-reflex-sdl2")
-      (version (git-version "0.3.0.2" revision commit))
+      (version (make-git-version "0.3.0.2" revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index a176253122d..8f22f50c041 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -54,7 +54,7 @@ (define-public musl-cross
         (commit "a8a66490dae7f23a2cf5e256f3a596d1ccfe1a03"))
   (package
     (name "musl-cross")
-    (version (git-version "0.1" revision commit))
+    (version (make-git-version "0.1" revision commit))
     (source
      (origin
         (method git-fetch)
diff --git a/gnu/packages/high-availability.scm b/gnu/packages/high-availability.scm
index a70a990cb0a..3846a2979b8 100644
--- a/gnu/packages/high-availability.scm
+++ b/gnu/packages/high-availability.scm
@@ -85,7 +85,7 @@ (define-public cowsql
         (revision "0"))
     (package
       (name "cowsql")
-      (version (git-version "1.15.8" revision commit))
+      (version (make-git-version "1.15.8" revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index cde918372da..db8cd6f6a45 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -634,7 +634,7 @@ (define-public netdde
       (name "netdde")
       ;; The version prefix corresponds to the version of Linux from which the
       ;; drivers were taken.
-      (version (git-version "2.6.32.65" revision commit))
+      (version (make-git-version "2.6.32.65" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -744,7 +744,7 @@ (define-public rumpkernel
         (revision "0"))
     (package
       (name "rumpkernel")
-      (version (git-version "0-20250111" revision commit))
+      (version (make-git-version "0-20250111" revision commit))
       ;; This uses the Debian Salsa rumpkernel package git as upstream as that
       ;; is where development happens.  Once things have stabilized, upstream
       ;; may change to the NetBSD git from where Debian takes their snapshots.
-- 
2.50.1