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

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

find gnu/packages/ -type f -name "a*.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/accessibility.scm |  2 +-
 gnu/packages/admin.scm         | 20 ++++++++++---------
 gnu/packages/agda.scm          |  4 ++--
 gnu/packages/aidc.scm          |  2 +-
 gnu/packages/algebra.scm       |  5 +++--
 gnu/packages/animation.scm     |  2 +-
 gnu/packages/appimage.scm      |  5 +++--
 gnu/packages/arcan.scm         |  2 +-
 gnu/packages/assembly.scm      |  2 +-
 gnu/packages/astronomy.scm     | 24 +++++++++++------------
 gnu/packages/audio.scm         | 36 ++++++++++++++++++----------------
 gnu/packages/autotools.scm     |  2 +-
 gnu/packages/axoloti.scm       |  2 +-
 13 files changed, 57 insertions(+), 51 deletions(-)

diff --git a/gnu/packages/accessibility.scm b/gnu/packages/accessibility.scm
index bf1e56f6629..af777cd02eb 100644
--- a/gnu/packages/accessibility.scm
+++ b/gnu/packages/accessibility.scm
@@ -277,7 +277,7 @@ (define-public footswitch
         (revision "0"))
     (package
       (name "footswitch")
-      (version (git-version "1.0" revision commit))
+      (version (make-git-version "1.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index cc57b1207ec..ca696bde341 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -995,7 +995,7 @@ (define-public ttyload
         (commit "f9495372801ce4b4dad98ad854203e694c31c1eb"))
     (package
       (name "ttyload")
-      (version (git-version "0.5.3" revision commit))
+      (version (make-git-version "0.5.3" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -3619,7 +3619,7 @@ (define-public nettop
         (commit "689d6557196e9fcc92cffba82e00fac0386419e5"))
     (package
       (name "nettop")
-      (version (git-version "0.5" revision commit))
+      (version (make-git-version "0.5" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -4063,7 +4063,7 @@ (define-public interrobang
         (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
     (package
       (name "interrobang")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -4598,7 +4598,7 @@ (define-public pfetch
         (revision "1"))
     (package
       (name "pfetch")
-      (version (git-version "0.7.0" revision commit))
+      (version (make-git-version "0.7.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -4618,7 +4618,8 @@ (define-public pfetch
            (let* ((source (lambda (f)
                             (string-append (assoc-ref %build-inputs "source") "/" f)))
                   (output (assoc-ref %outputs "out"))
-                  (docdir (string-append output "/share/doc/pfetch-" ,version)))
+                  (docdir (string-append output "/share/doc/pfetch-"
+                                         ,(package-version this-package))))
              (install-file (source "LICENSE.md") docdir)
              (install-file (source "README.md") docdir)
              (install-file (source "pfetch") (string-append output "/bin"))
@@ -5329,7 +5330,7 @@ (define-public pam-uaccess
         (revision "0"))
     (package
       (name "pam-uaccess")
-      (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
@@ -5796,7 +5797,7 @@ (define-public lsofgraph
         (revision "1"))
     (package
       (name "lsofgraph")
-      (version (git-version "0.0.1" revision commit)) ;no upstream release
+      (version (make-git-version "0.0.1" revision commit)) ;no upstream release
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -5826,7 +5827,8 @@ (define-public lsofgraph
            ;; install phase
            (install-file "lsofgraph" (string-append %output "/bin"))
            (let ((doc (string-append
-                       %output "/share/doc/" ,name "-" ,version)))
+                       %output "/share/doc/" ,name "-"
+                       ,(package-version this-package))))
              (mkdir-p doc)
              (install-file "LICENSE" doc)
              (install-file "README.md" doc))
@@ -6400,7 +6402,7 @@ (define-public restartd
          (revision "1"))
     (package
       (name "restartd")
-      (version (git-version "0.2.3" revision commit))
+      (version (make-git-version "0.2.3" revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/agda.scm b/gnu/packages/agda.scm
index ff232784690..2e9d38d7140 100644
--- a/gnu/packages/agda.scm
+++ b/gnu/packages/agda.scm
@@ -164,7 +164,7 @@ (define-public agda-ial
         (commit "ded30c410d5d40142249686572aa1acd1b2f8cc7"))
    (package
      (name "agda-ial")
-     (version (git-version "1.5.0" revision commit))
+     (version (make-git-version "1.5.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference (url "https://github.com/cedille/ial")
@@ -298,7 +298,7 @@ (define-public agda-1lab
          (commit "afcf848d367f906d6d07d1612fbd41d7dd8c978e"))
     (package
       (name "agda-1lab")
-      (version (git-version "0.0" revision commit))
+      (version (make-git-version "0.0" revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm
index 24738a4c010..0aa4677cd8f 100644
--- a/gnu/packages/aidc.scm
+++ b/gnu/packages/aidc.scm
@@ -130,7 +130,7 @@ (define-public zxing-cpp-1.2a
         (commit "00783db7aa3bcf8620a301854ac71c0ceaaca0c1"))
     (package/inherit zxing-cpp
       (name "zxing-cpp")
-      (version (git-version "1.2.0" revision commit))
+      (version (make-git-version "1.2.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index fca970627ee..00a5d78d01d 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -1939,7 +1939,7 @@ (define-public form
         (revision "0"))
     (package
       (name "form")
-      (version (git-version "4.3.0" revision commit))
+      (version (make-git-version "4.3.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1972,7 +1972,8 @@ (define-public form
                             (lambda _
                               (let ((doc (string-append
                                           #$output "/share/doc/" #$name "-"
-                                          #$version "/html")))
+                                          #$(package-version this-package)
+                                          "/html")))
                                 (mkdir-p doc)
                                 (copy-recursively "doc/doxygen/html" doc)))))))
       (native-inputs (list autoconf automake doxygen ruby))
diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
index 4fca759ef57..b9f77b1de9e 100644
--- a/gnu/packages/animation.scm
+++ b/gnu/packages/animation.scm
@@ -388,7 +388,7 @@ (define-public swftools
         (revision "2"))
     (package
       (name "swftools")
-      (version (git-version "0.9.2" revision commit))
+      (version (make-git-version "0.9.2" revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/appimage.scm b/gnu/packages/appimage.scm
index 620628c053d..3872821a1d1 100644
--- a/gnu/packages/appimage.scm
+++ b/gnu/packages/appimage.scm
@@ -35,7 +35,7 @@ (define-public appimage-type2-runtime
         (commit "47b665594856b4e8928f8932adcf6d13061d8c30"))
     (package
       (name "appimage-type2-runtime")
-      (version (git-version "continuous" revision commit))
+      (version (make-git-version "continuous" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -52,7 +52,8 @@ (define-public appimage-type2-runtime
                 (string-append "CC=" #$(cc-for-target))
                 (string-append
                  "CFLAGS=" "-I" #$(this-package-input "fuse") "/include/fuse/"
-                 " -DGIT_COMMIT='\"" "guix-" #$version "\"'"
+                 " -DGIT_COMMIT='\""
+                 "guix-" #$(package-version this-package) "\"'"
                  " -D_FILE_OFFSET_BITS=64"
                  " -static"
                  " -Wno-int-conversion"))
diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index 49b5d04990a..74f6d348381 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -191,7 +191,7 @@ (define-public durden
         (revision "2"))
     (package
       (name "durden")
-      (version (git-version "0.6.1" revision commit))
+      (version (make-git-version "0.6.1" revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm
index 572ad705d55..7c09a42aaa8 100644
--- a/gnu/packages/assembly.scm
+++ b/gnu/packages/assembly.scm
@@ -713,7 +713,7 @@ (define-public neon2sse
         (revision "1"))
     (package
       (name "neon2sse")
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index d228b554c3c..c3a11bbb13d 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -191,7 +191,7 @@ (define-public aocommon
         (revision "2"))
     (package
       (name "aocommon")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1533,7 +1533,7 @@ (define-public phd2
         (revision "0"))
     (package
       (name "phd2")
-      (version (git-version "2.6.13" revision commit))
+      (version (make-git-version "2.6.13" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1925,7 +1925,7 @@ (define-public python-asdf-compression
         (revision "2"))
     (package
       (name "python-asdf-compression")
-      (version (git-version "0.0.1" revision commit))
+      (version (make-git-version "0.0.1" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -3110,7 +3110,7 @@ (define-public python-colossus
         (revision "0"))
     (package
       (name "python-colossus")
-      (version (git-version "1.3.8" revision commit))
+      (version (make-git-version "1.3.8" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -5597,7 +5597,7 @@ (define-public python-so-noise-models
         (revision "0"))
     (package
       (name "python-so-noise-models")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch) ; no release on PyPI
@@ -6956,7 +6956,7 @@ (define-public python-pysynphot
         (revision "0"))
     (package
       (name "python-pysynphot")
-      (version (git-version "2.0.0" revision commit))
+      (version (make-git-version "2.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -7213,7 +7213,7 @@ (define-public python-asdf-fits-schemas
          (revision "2"))
      (package
        (name "python-asdf-fits-schemas")
-       (version (git-version "0.0.1" revision commit))
+       (version (make-git-version "0.0.1" revision commit))
        (source
         (origin
           (method git-fetch)
@@ -8730,7 +8730,7 @@ (define-public sgp4
         (revision "2"))
     (package
       (name "sgp4")
-      (version (git-version "1.0" revision commit))
+      (version (make-git-version "1.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -9061,7 +9061,7 @@ (define-public stellarium
         (revision "2"))
     (package
     (name "stellarium")
-    (version (git-version "25.1" revision commit))
+    (version (make-git-version "25.1" revision commit))
     (source
      (origin
        (method git-fetch)
@@ -9160,7 +9160,7 @@ (define-public sunclock
         (revision "1"))
     (package
       (name "sunclock")
-      (version (git-version "3.57" revision commit))
+      (version (make-git-version "3.57" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -9365,7 +9365,7 @@ (define-public unsio
         (revision "1"))
     (package
       (name "unsio")
-      (version (git-version "1.3.3" revision commit))
+      (version (make-git-version "1.3.3" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -9464,7 +9464,7 @@ (define-public uranimator
         (revision "0"))
     (package
       (name "uranimator")
-      (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/audio.scm b/gnu/packages/audio.scm
index e5d68b5c4e7..3ec8bae7039 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -289,7 +289,7 @@ (define-public alsa-midi-latency-test
         (commit "07e43f8a1e6fd6d3bd97a00f2ee5afb74cb66f95"))
     (package
       (name "alsa-midi-latency-test")
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (source
        (origin
          (method git-fetch)
@@ -460,7 +460,7 @@ (define-public fmsynth-lv2
         (revision "0"))
     (package
       (name "fmsynth-lv2")
-      (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
@@ -1516,7 +1516,7 @@ (define-public azr3
         (revision "1"))
     (package
       (name "azr3")
-      (version (git-version "1.2.3" revision commit))
+      (version (make-git-version "1.2.3" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1544,7 +1544,9 @@ (define-public azr3
                   (lambda (port) (display "" port)))
                 (substitute* "Makefile"
                   (("^PACKAGE_VERSION =.*")
-                   (string-append "PACKAGE_VERSION = \"" #$version "\"\n")))))
+                   (string-append "PACKAGE_VERSION = \""
+                                  #$(package-version this-package)
+                                  "\"\n")))))
             (add-before 'install 'fix-timestamp
               (lambda _
                 (let ((early-1980 315619200)) ; 1980-01-02 UTC
@@ -1893,7 +1895,7 @@ (define-public omins-lv2
       (name "omins-lv2")
       ;; No release despite being perfectly usable. 0.0.0 seems to be the only
       ;; version the author ever specified:
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin (method git-fetch)
 	       (uri
@@ -2117,7 +2119,7 @@ (define-public tao-synth
         (revision "1"))
     (package
       (name "tao-synth")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -2181,7 +2183,7 @@ (define-public midicomp
         (revision "1"))
     (package
       (name "midicomp")
-      (version (git-version "0.0.8" revision commit))
+      (version (make-git-version "0.0.8" revision commit))
       (source
         (origin
           (method git-fetch)
@@ -3848,7 +3850,7 @@ (define-public lvtk-2
         (revision "0"))
     (package
       (name "lvtk")
-      (version (git-version "2" revision commit))
+      (version (make-git-version "2" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -3877,7 +3879,7 @@ (define-public lvtk-1
         (revision "0"))
     (package
       (name "lvtk")
-      (version (git-version "1.2.0" revision commit))
+      (version (make-git-version "1.2.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -4706,7 +4708,7 @@ (define-public stargate-sbsms
         (revision "0"))
     (package/inherit libsbsms
       (name "stargate-sbsms")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (home-page "https://github.com/stargatedaw/stargate-sbsms")
       (source
        (origin
@@ -4800,7 +4802,7 @@ (define-public wstsound
         (revision "0"))
     (package
       (name "wstsound")
-      (version (git-version "0.3.0" revision commit))
+      (version (make-git-version "0.3.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -4829,7 +4831,7 @@ (define-public libmixed
         (revision "1"))
     (package
       (name "libmixed")
-      (version (git-version "2.0" revision commit))
+      (version (make-git-version "2.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -4990,7 +4992,7 @@ (define-public stargate-soundtouch
         (revision "0"))
     (package/inherit soundtouch
       (name "stargate-soundtouch")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (home-page "https://github.com/stargatedaw/stargate-soundtouch")
       (source
        (origin
@@ -5919,7 +5921,7 @@ (define-public lv2-speech-denoiser
         (revision "1"))
     (package
       (name "lv2-speech-denoiser")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -6500,7 +6502,7 @@ (define-public carla-2.6
     (package
       (inherit carla)
       (name "carla")
-      (version (git-version "2.6.0" revision commit))
+      (version (make-git-version "2.6.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -6794,7 +6796,7 @@ (define-public mbelib
         (revision "1"))
     (package
       (name "mbelib")
-      (version (git-version "1.3.0" revision commit))
+      (version (make-git-version "1.3.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -7353,7 +7355,7 @@ (define-public cubeb
         (revision "1"))
     (package
       (name "cubeb")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 273a75509e8..0c121ef82ca 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -541,7 +541,7 @@ (define-public config
         (commit "c8ddc8472f8efcadafc1ef53ca1d863415fddd5f"))
     (package
       (name "config")
-      (version (git-version "0.0.0" revision commit)) ;no release tag
+      (version (make-git-version "0.0.0" revision commit)) ;no release tag
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/axoloti.scm b/gnu/packages/axoloti.scm
index 75087359fd4..1a45c215f60 100644
--- a/gnu/packages/axoloti.scm
+++ b/gnu/packages/axoloti.scm
@@ -354,7 +354,7 @@ (define-public ksoloti-runtime
         (commit "b7ae4753b33532597db232285f4f3c1808f516b4"))
     (package
       (name "ksoloti-runtime")
-      (version (git-version "1.1.0" revision commit))
+      (version (make-git-version "1.1.0" revision commit))
       (source
        (origin
          (method git-fetch)
-- 
2.50.1