Subject: [PATCH 15/34] gnu/packages/f*.scm: Use make-git-version.

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

find gnu/packages/ -type f -name "f*.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/file-systems.scm   | 15 +++++++++------
 gnu/packages/finance.scm        |  8 ++++----
 gnu/packages/firmware.scm       |  8 ++++----
 gnu/packages/flashing-tools.scm |  6 +++---
 gnu/packages/fonts.scm          | 34 ++++++++++++++++-----------------
 gnu/packages/fontutils.scm      |  2 +-
 gnu/packages/fpga.scm           | 14 +++++++-------
 gnu/packages/freedesktop.scm    | 14 +++++++-------
 8 files changed, 52 insertions(+), 49 deletions(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 8b0ccb5a6fd..b31c8543649 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1429,7 +1429,7 @@ (define-public apfs-fuse
         (revision "2"))
     (package
       (name "apfs-fuse")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1451,7 +1451,9 @@ (define-public apfs-fuse
                       (bin (string-append out "/bin"))
                       (lib (string-append out "/lib"))
                       (doc (string-append out "/share/doc/"
-                                          (string-append ,name "-" ,version))))
+                                          (string-append ,name "-"
+                                                         ,(package-version
+                                                           this-package)))))
                  (install-file "apfs-dump" bin)
                  (install-file "apfs-dump-quick" bin)
                  (install-file "apfs-fuse" bin)
@@ -1550,7 +1552,7 @@ (define-public xfstests
         (commit "8de535c53887bb49adae74a1b2e83e77d7e8457d"))
     (package
       (name "xfstests")
-      (version (git-version "1.1.0" revision commit))
+      (version (make-git-version "1.1.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1996,7 +1998,7 @@ (define-public mergerfs-tools
     (package
       (name "mergerfs-tools")
       ;; No released version exists.
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2087,7 +2089,7 @@ (define-public rewritefs
         (commit "3a56de8b5a2d44968b8bc3885c7d661d46367306"))
     (package
       (name "rewritefs")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2114,7 +2116,8 @@ (define-public rewritefs
             (add-after 'install 'install-examples
               (lambda _
                 (let ((doc (string-append #$output "/share/doc/"
-                                          #$name "-" #$version)))
+                                          #$name "-"
+                                          #$(package-version this-package))))
                   (for-each (cut install-file <> (string-append doc "/examples"))
                             (find-files "." "^config\\."))))))))
       (native-inputs
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index c8c0465b4a5..35dcf8f388e 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -420,7 +420,7 @@ (define-public emacs-ledger-mode
         (revision "1"))
     (package
       (name "emacs-ledger-mode")
-      (version (git-version "4.0.0" revision commit))
+      (version (make-git-version "4.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -485,7 +485,7 @@ (define-public emacs-hledger-mode
         (revision "1"))
     (package
       (name "emacs-hledger-mode")
-      (version (git-version "20220515" revision commit))
+      (version (make-git-version "20220515" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1553,7 +1553,7 @@ (define-public gbonds
         (commit "3054ee2f90cc7c03ed6b131177d09701c7a4fced"))
     (package
       (name "gbonds")
-      (version (git-version "2.0.3" revision commit))
+      (version (make-git-version "2.0.3" revision commit))
       (source
        (let ((unapplied
               (origin
@@ -1666,7 +1666,7 @@ (define-public trezord-udev-rules
         (revision "0"))
       (package
         (name "trezord-udev-rules")
-        (version (git-version "0.0.0" revision commit))
+        (version (make-git-version "0.0.0" revision commit))
         (source
          (origin
            (method git-fetch)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index bcb30ec399b..a18b2461612 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -161,7 +161,7 @@ (define-public b43-tools
         (revision "1"))
     (package
       (name "b43-tools")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -496,7 +496,7 @@ (define* (make-openbios-package name arch)
         (revision "1"))
   (package
     (name name)
-    (version (git-version "1.1" revision commit))
+    (version (make-git-version "1.1" revision commit))
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -836,7 +836,7 @@ (define-public sgabios
         (revision "0"))
     (package
       (name "sgabios")
-      (version (git-version "0.0" revision commit))
+      (version (make-git-version "0.0" revision commit))
       (home-page "https://gitlab.com/qemu-project/sgabios")
       (source (origin
                 (method git-fetch)
@@ -1420,7 +1420,7 @@ (define* (make-ergodox-firmware/implementation layout #:key override.c
         (commit "89b7e2bfdafb2a87e0248846d5c95cc5e9a27858"))
     (package
       (name (string-append "ergodox-firmware-" layout))
-      (version (git-version "1" revision commit))
+      (version (make-git-version "1" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index fa9d88b30c0..70ba07a8a65 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -314,7 +314,7 @@ (define-public rkflashtool
         (revision "1"))
     (package
       (name "rkflashtool")
-      (version (git-version "5.2" revision commit))
+      (version (make-git-version "5.2" revision commit))
       (source
         (origin
           (method git-fetch)
@@ -646,7 +646,7 @@ (define-public wally-cli
         (revision "0"))
     (package
       (name "wally-cli")
-      (version (git-version "2.0.1" revision commit))
+      (version (make-git-version "2.0.1" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -691,7 +691,7 @@ (define-public qdl
         (revision "1"))
     (package
       (name "qdl")
-      (version (git-version "1.0" revision commit))
+      (version (make-git-version "1.0" revision commit))
       (source
         (origin
           (method git-fetch)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 82d4d044bb6..3848bc51882 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -138,7 +138,7 @@ (define-public font-arapey
         (revision "1"))
     (package
       (name "font-arapey")
-      (version (git-version "0.0.1" revision commit))
+      (version (make-git-version "0.0.1" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -206,7 +206,7 @@ (define-public font-chivo
         (revision "0"))
     (package
       (name "font-chivo")
-      (version (git-version "20221010" revision commit))
+      (version (make-git-version "20221010" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -278,7 +278,7 @@ (define-public font-lisnoti
         (revision "1"))
     (package
       (name "font-lisnoti")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -428,7 +428,7 @@ (define-public font-abattis-cantarell
         (revision "0"))
     (package
       (name "font-abattis-cantarell")
-      (version (git-version "0.303" revision commit))
+      (version (make-git-version "0.303" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -462,7 +462,7 @@ (define-public font-atkinson-hyperlegible
         (revision "0"))
     (package
       (name "font-atkinson-hyperlegible")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -505,7 +505,7 @@ (define-public font-carlito
         (revision "1"))
     (package
       (name "font-carlito")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -728,7 +728,7 @@ (define-public font-libre-franklin
         (revision "1"))
     (package
       (name "font-libre-franklin")
-      (version (git-version "1.502" revision commit))
+      (version (make-git-version "1.502" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2651,7 +2651,7 @@ (define-public font-go
         (revision "2"))
     (package
       (name "font-go")
-      (version (git-version "2.010" revision commit))
+      (version (make-git-version "2.010" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -3038,7 +3038,7 @@ (define-public font-paytone-one
         (revision "0"))
     (package
       (name "font-paytone-one")
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (source
        (origin
          (method git-fetch)
@@ -3294,7 +3294,7 @@ (define-public font-dongle
         (revision "1"))
     (package
       (name "font-dongle")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -3671,7 +3671,7 @@ (define-public font-hachimarupop
         (revision "0"))
     (package
       (name "font-hachimarupop")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -3761,7 +3761,7 @@ (define-public font-catamaran
         (revision "1"))
     (package
       (name "font-catamaran")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -4063,7 +4063,7 @@ (define-public font-atui-feather
         (revision "1"))
     (package
       (name "font-atui-feather")
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -4358,7 +4358,7 @@ (define-public font-velvetyne-jgs
         (commit "b1fe344c6ab4cb97aa9ceb09ba3b6056f826b040"))
     (package
       (name "font-velvetyne-jgs")
-      (version (git-version "1.0" revision commit))
+      (version (make-git-version "1.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -4444,7 +4444,7 @@ (define-public font-orbitron
         (revision "0"))
     (package
       (name "font-orbitron")
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (source
        (origin
          (method git-fetch)
@@ -4471,7 +4471,7 @@ (define-public font-oswald
         (revision "0"))
     (package
       (name "font-oswald")
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (source
        (origin
          (method git-fetch)
@@ -4499,7 +4499,7 @@ (define-public font-teko
         (revision "0"))
     (package
       (name "font-teko")
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 9b0dfa94790..82dca937d3f 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -824,7 +824,7 @@ (define-public psautohint-font-data
     (hidden-package
      (package
        (name "psautohint-font-data")
-       (version (git-version "0.0.0" revision commit))
+       (version (make-git-version "0.0.0" revision commit))
        (source
         (origin
           (method git-fetch)
diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 805983f6c7f..0130ede9b72 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -95,7 +95,7 @@ (define-public abc
         (revision "5"))
     (package
       (name "abc")
-      (version (git-version "0.0" revision commit))
+      (version (make-git-version "0.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -303,7 +303,7 @@ (define-public icestorm
         (revision "5"))
     (package
       (name "icestorm")
-      (version (git-version "0.0" revision commit))
+      (version (make-git-version "0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -368,7 +368,7 @@ (define-public libfst
         (revision "0"))
     (package
       (name "libfst")
-      (version (git-version "1.0.0" revision commit))
+      (version (make-git-version "1.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -512,7 +512,7 @@ (define-public gtkwave
     (package
       (name "gtkwave")
       ;; The version string can be found in meson.build.
-      (version (git-version "3.4.0" revision commit))
+      (version (make-git-version "3.4.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -547,7 +547,7 @@ (define-public python-migen
         (revision "0"))
     (package
       (name "python-migen")
-      (version (git-version "0.9.2" revision commit))
+      (version (make-git-version "0.9.2" revision commit))
       (source
        (origin
          ;; Tests fail in the PyPI tarball due to missing files.
@@ -790,7 +790,7 @@ (define-public fftgen
         (revision "0"))
     (package
       (name "fftgen")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -868,7 +868,7 @@ (define-public python-hdlmake
         (revision "2"))
     (package
       (name "python-hdlmake")
-      (version (git-version "3.3" revision commit))
+      (version (make-git-version "3.3" revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 7f50cb0acd7..a9419d7aa2f 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -561,7 +561,7 @@ (define xdgmime
         (revision "2"))
     (package
       (name "xdgmime")
-      (version (git-version "0.0" revision commit))
+      (version (make-git-version "0.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -672,7 +672,7 @@ (define-public xdgcpp
         (revision "0"))
     (package
       (name "xdgcpp")
-      (version (git-version "0.1.0" revision commit))
+      (version (make-git-version "0.1.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1819,7 +1819,7 @@ (define-public wlr-protocols
         (revision "0"))
     (package
       (name "wlr-protocols")
-      (version (git-version "1.0" revision commit))
+      (version (make-git-version "1.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2286,7 +2286,7 @@ (define-public telepathy-gabble
         (revision "1"))
     (package
       (name "telepathy-gabble")
-      (version (git-version "0.18.4" revision commit))
+      (version (make-git-version "0.18.4" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2365,7 +2365,7 @@ (define-public telepathy-logger
         (revision "0"))
     (package
       (name "telepathy-logger")
-      (version (git-version "0.8.2" revision commit))
+      (version (make-git-version "0.8.2" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -2429,7 +2429,7 @@ (define-public telepathy-idle
         (revision "0"))
     (package
       (name "telepathy-idle")
-      (version (git-version "0.2.2" revision commit))
+      (version (make-git-version "0.2.2" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2487,7 +2487,7 @@ (define-public telepathy-salut
         (revision "1"))
     (package
       (name "telepathy-salut")
-      (version (git-version "0.8.1" revision commit))
+      (version (make-git-version "0.8.1" revision commit))
       (source
        (origin
          (method git-fetch)
-- 
2.50.1