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

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

find gnu/packages/ -type f -name "s*.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/scanner.scm        |  2 +-
 gnu/packages/scheme.scm         | 10 +++++-----
 gnu/packages/sdl.scm            |  2 +-
 gnu/packages/search.scm         |  2 +-
 gnu/packages/serialization.scm  |  4 ++--
 gnu/packages/shells.scm         |  4 ++--
 gnu/packages/shellutils.scm     |  4 ++--
 gnu/packages/specifications.scm | 10 +++++-----
 gnu/packages/ssh.scm            |  8 +++++---
 gnu/packages/statistics.scm     | 18 +++++++++---------
 gnu/packages/stb.scm            |  2 +-
 gnu/packages/suckless.scm       | 14 +++++++-------
 gnu/packages/sugar.scm          | 30 +++++++++++++++---------------
 gnu/packages/sync.scm           |  4 ++--
 gnu/packages/syncthing.scm      |  2 +-
 gnu/packages/syndication.scm    |  2 +-
 16 files changed, 60 insertions(+), 58 deletions(-)

diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm
index 259e378b658..fa7b44ee265 100644
--- a/gnu/packages/scanner.scm
+++ b/gnu/packages/scanner.scm
@@ -257,7 +257,7 @@ (define-public utsushi
   (let ((commit "839d06a5a80b353cb604eb9f7d352a1648ab1fdf"))
     (package
       (name "utsushi")
-      (version (git-version "0.65.0" "1" commit))
+      (version (make-git-version "0.65.0" "1" commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 81b948f8cf4..89db0454971 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -644,7 +644,7 @@ (define-public unsyntax
         (revision "0"))
     (package
       (name "unsyntax")
-      (version (git-version "0.0.3" revision commit))
+      (version (make-git-version "0.0.3" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -676,7 +676,7 @@ (define-public unsyntax
                      ;; Tell git-version-gen the correct version number.
                      (call-with-output-file ".tarball-version"
                        (lambda (port)
-                         (display #$version port)))))
+                         (display #$(package-version this-package) port)))))
                  (add-before 'configure 'patch-exec-paths
                    (lambda _
                      ;; Fix hard-coded references to chibi-scheme, using the
@@ -706,7 +706,7 @@ (define-public sicp
         (revision "3"))
     (package
       (name "sicp")
-      (version (git-version "20180718" revision commit))
+      (version (make-git-version "20180718" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1229,7 +1229,7 @@ (define-public sbcl-airship-scheme
         (revision "0"))
     (package
       (name "sbcl-airship-scheme")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1510,7 +1510,7 @@ (define-public r7rs-small-texinfo
         (revision "3"))
     (package
       (name "r7rs-small-texinfo")
-      (version (git-version "0.1.0" revision commit))
+      (version (make-git-version "0.1.0" revision commit))
       (home-page "https://codeberg.org/Zipheir/r7rs-small-texinfo/")
       (source
        (origin
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 9b5b8c9a105..07a087a9cbe 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -776,7 +776,7 @@ (define-public sdl2-gamecontrollerdb
         (revision "2"))
     (package
       (name "sdl2-gamecontrollerdb")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source
        (origin
          (method git-fetch)
diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm
index c0e3654fd8f..6e433a39eaa 100644
--- a/gnu/packages/search.scm
+++ b/gnu/packages/search.scm
@@ -302,7 +302,7 @@ (define-public dataparksearch
         (revision "0"))
     (package
       (name "dataparksearch")
-      (version (git-version "4.54" revision commit))
+      (version (make-git-version "4.54" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 89d362c52f3..20b0cd479c0 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -668,7 +668,7 @@ (define-public json.sh
         (revision "1"))
     (package
       (name "json.sh")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1055,7 +1055,7 @@ (define-public libnop
         (revision "0"))
     (package
       (name "libnop")
-      (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/shells.scm b/gnu/packages/shells.scm
index 84e19254ad9..594d2d4a882 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -658,7 +658,7 @@ (define-public scsh
         (revision "0"))
     (package
       (name "scsh")
-      (version (git-version "0.7" revision commit))
+      (version (make-git-version "0.7" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -755,7 +755,7 @@ (define-public s-shell
         (revision "2"))
     (package
       (name "s-shell")
-      (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/shellutils.scm b/gnu/packages/shellutils.scm
index 4d611e7d969..97682e36ef5 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -729,7 +729,7 @@ (define-public tran
     (package
       (name "tran")
       ;; The latest upstream version seems to be "v5".
-      (version (git-version "5.0.0" revision commit))
+      (version (make-git-version "5.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -911,7 +911,7 @@ (define-public shell-functools
         (revision "0"))
     (package
       (name "shell-functools")
-      (version (git-version "0.3.0" revision commit))
+      (version (make-git-version "0.3.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/specifications.scm b/gnu/packages/specifications.scm
index d0f121fb56c..89fc62ec047 100644
--- a/gnu/packages/specifications.scm
+++ b/gnu/packages/specifications.scm
@@ -59,7 +59,7 @@ (define-public specification-ipld
         (revision "0"))
     (package
       (name "specification-ipld")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -89,7 +89,7 @@ (define-public specification-multibase
         (revision "1"))
     (package
       (name "specification-multibase")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -116,7 +116,7 @@ (define-public specification-multicodec
         (revision "0"))
     (package
       (name "specification-multicodec")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -144,7 +144,7 @@ (define-public specification-multihash
         (revision "0"))
     (package
       (name "specification-multihash")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -208,7 +208,7 @@ (define-public specification-specreduce-data
         (revision "0"))
     (package
       (name "specification-specreduce-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/ssh.scm b/gnu/packages/ssh.scm
index 1fecee078f7..1386fcfa559 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -447,7 +447,7 @@ (define-public corkscrew
         (commit "268b71e88ee51fddceab96d665b327394f1feb12"))
     (package
       (name "corkscrew")
-      (version (git-version "2.0" revision commit))
+      (version (make-git-version "2.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -467,7 +467,8 @@ (define-public corkscrew
              (lambda _
                (substitute* "configure.ac"
                  ;; Our version differs significantly.
-                 (("2.0") (string-append ,version " (Guix)")))
+                 (("2.0")
+                  (string-append ,(package-version this-package) " (Guix)")))
                (substitute* "corkscrew.c"
                  ;; This domain's since been squat.
                  (("\\(agroman@agroman\\.net\\)")
@@ -475,7 +476,8 @@ (define-public corkscrew
            (add-after 'install 'install-documentation
              (lambda* (#:key outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
-                      (doc (string-append out "/share/doc/" ,name "-" ,version)))
+                      (doc (string-append out "/share/doc/" ,name "-"
+                                          ,(package-version this-package))))
                  (install-file "README.md" doc)
                  #t))))))
       (native-inputs
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index a8cfd9104af..9eaf1a52fa9 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -2648,7 +2648,7 @@ (define-public r-tgconfig
         (revision "1"))
     (package
       (name "r-tgconfig")
-      (version (git-version "0.1.2" revision commit))
+      (version (make-git-version "0.1.2" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2680,7 +2680,7 @@ (define-public r-tgutil
         (revision "1"))
     (package
       (name "r-tgutil")
-      (version (git-version "0.1.15" revision commit))
+      (version (make-git-version "0.1.15" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2720,7 +2720,7 @@ (define-public r-catterplots
         (revision "3"))
     (package
       (name "r-catterplots")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -2744,7 +2744,7 @@ (define-public r-nnlm
         (revision "1"))
     (package
       (name "r-nnlm")
-      (version (git-version "0.4.4" revision commit))
+      (version (make-git-version "0.4.4" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2775,7 +2775,7 @@ (define-public r-swne
         (revision "1"))
     (package
       (name "r-swne")
-      (version (git-version "0.6.20" revision commit))
+      (version (make-git-version "0.6.20" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2829,7 +2829,7 @@ (define-public r-languageserver
         (revision "1"))
     (package
       (name "r-languageserver")
-      (version (git-version "0.3.12" revision commit))
+      (version (make-git-version "0.3.12" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -3252,7 +3252,7 @@ (define-public xlispstat
         (revision "0"))
     (package
       (name "xlispstat")
-      (version (git-version "3.52.23" revision commit))
+      (version (make-git-version "3.52.23" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -3364,7 +3364,7 @@ (define-public r-mixedpower
         (revision "2"))
     (package
       (name "r-mixedpower")
-      (version (git-version "2.0" revision commit))
+      (version (make-git-version "2.0" revision commit))
       (source
         (origin
           ;; Not available on CRAN.
@@ -3395,7 +3395,7 @@ (define-public r-colorway
         (revision "1"))
     (package
       (name "r-colorway")
-      (version (git-version "0.2.0" revision commit))
+      (version (make-git-version "0.2.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/stb.scm b/gnu/packages/stb.scm
index f3be6a56ec4..7b83692a018 100644
--- a/gnu/packages/stb.scm
+++ b/gnu/packages/stb.scm
@@ -34,7 +34,7 @@ (define stb
     (package
       (name "stb")
       (home-page "https://github.com/nothings/stb")
-      (version (git-version "0.0" revision commit))
+      (version (make-git-version "0.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 416f7cbbe1d..1fb1d53c0f7 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -144,7 +144,7 @@ (define-public slstatus
         (revision "0"))
     (package
       (name "slstatus")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -942,7 +942,7 @@ (define-public libutf
         (commit "ff4c60635e1f455b0a0b4200f8183fbd5a88225b"))
     (package
       (name "libutf")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -989,7 +989,7 @@ (define-public lchat
         (commit "e3b64e67b9b9d832462382246474ce1e7d92217c"))
     (package
       (name "lchat")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1068,7 +1068,7 @@ (define-public sbase
         (revision "0"))
     (package
       (name "sbase")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1195,7 +1195,7 @@ (define-public farbfeld
   (let ((commit "ab5e3dfc9cdb476218538c6687df9f44826d8f11") (revision "0"))
     (package
       (name "farbfeld")
-      (version (git-version "4" revision commit))
+      (version (make-git-version "4" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1236,7 +1236,7 @@ (define-public snafu
         (revision "0"))
     (package
       (name "snafu")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1300,7 +1300,7 @@ (define-public lib9
         (revision "0"))
     (package
       (name "lib9")
-      (version (git-version "7" revision commit))
+      (version (make-git-version "7" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm
index c95f645212a..0c159244802 100644
--- a/gnu/packages/sugar.scm
+++ b/gnu/packages/sugar.scm
@@ -413,7 +413,7 @@ (define-public sugar-block-party-activity
         (revision "1"))
     (package
       (name "sugar-block-party-activity")
-      (version (git-version "12" revision commit))
+      (version (make-git-version "12" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -513,7 +513,7 @@ (define-public sugar-cellgame-activity
         (revision "1"))
     (package
       (name "sugar-cellgame-activity")
-      (version (git-version "5" revision commit))
+      (version (make-git-version "5" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -573,7 +573,7 @@ (define-public sugar-chat-activity
         (revision "1"))
     (package
       (name "sugar-chat-activity")
-      (version (git-version "86" revision commit))
+      (version (make-git-version "86" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -623,7 +623,7 @@ (define-public sugar-classify-cats-activity
         (revision "1"))
     (package
       (name "sugar-classify-cats-activity")
-      (version (git-version "2" revision commit))
+      (version (make-git-version "2" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -670,7 +670,7 @@ (define-public sugar-commander-activity
         (revision "1"))
     (package
       (name "sugar-commander-activity")
-      (version (git-version "11" revision commit))
+      (version (make-git-version "11" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -736,7 +736,7 @@ (define-public sugar-help-activity
         (revision "1"))
     (package
       (name "sugar-help-activity")
-      (version (git-version "20" revision commit))
+      (version (make-git-version "20" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -785,7 +785,7 @@ (define-public sugar-jukebox-activity
         (revision "2"))
     (package
       (name "sugar-jukebox-activity")
-      (version (git-version "36" revision commit))
+      (version (make-git-version "36" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -832,7 +832,7 @@ (define-public sugar-log-activity
         (revision "1"))
     (package
       (name "sugar-log-activity")
-      (version (git-version "42" revision commit))
+      (version (make-git-version "42" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -937,7 +937,7 @@ (define-public sugar-physics-activity
         (revision "1"))
     (package
       (name "sugar-physics-activity")
-      (version (git-version "35" revision commit))
+      (version (make-git-version "35" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -998,7 +998,7 @@ (define-public sugar-portfolio-activity
         (revision "1"))
     (package
       (name "sugar-portfolio-activity")
-      (version (git-version "52" revision commit))
+      (version (make-git-version "52" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1097,7 +1097,7 @@ (define-public sugar-river-crossing-activity
         (revision "1"))
     (package
       (name "sugar-river-crossing-activity")
-      (version (git-version "1" revision commit))
+      (version (make-git-version "1" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1157,7 +1157,7 @@ (define-public sugar-terminal-activity
         (revision "1"))
     (package
       (name "sugar-terminal-activity")
-      (version (git-version "47" revision commit))
+      (version (make-git-version "47" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1202,7 +1202,7 @@ (define-public sugar-turtleart-activity
         (revision "1"))
     (package
       (name "sugar-turtleart-activity")
-      (version (git-version "202" revision commit))
+      (version (make-git-version "202" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1288,7 +1288,7 @@ (define-public sugar-turtlepond-activity
         (revision "1"))
     (package
       (name "sugar-turtlepond-activity")
-      (version (git-version "10" revision commit))
+      (version (make-git-version "10" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1395,7 +1395,7 @@ (define-public sugar-write-activity
         (revision "1"))
     (package
       (name "sugar-write-activity")
-      (version (git-version "101" revision commit))
+      (version (make-git-version "101" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index 568f2e3de06..a01214a6b37 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -484,7 +484,7 @@ (define-public usync
         (commit "09a8059a1adc22666d3ecf7872e22e6846c3ac9e"))
     (package
       (name "usync")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -520,7 +520,7 @@ (define-public casync
         (revision "0"))
     (package
       (name "casync")
-      (version (git-version "2" revision commit))
+      (version (make-git-version "2" revision commit))
       (home-page "https://github.com/systemd/casync/")
       (source (origin
                 (method git-fetch)
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index e64bfb1efc8..3543a303e20 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -143,7 +143,7 @@ (define-public syncthing-gtk
         (commit "1e84f332e413ba123bcd443443ffc2b435ffafd2"))
     (package
       (name "syncthing-gtk")
-      (version (git-version "0.9.4.4" revision commit))
+      (version (make-git-version "0.9.4.4" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/syndication.scm b/gnu/packages/syndication.scm
index dfe6a782be2..ade1245f240 100644
--- a/gnu/packages/syndication.scm
+++ b/gnu/packages/syndication.scm
@@ -590,7 +590,7 @@ (define-public syndication-domination
         (commit "75920321062d682437f3fb0319dad227d8b18f6c"))
     (package
       (name "syndication-domination")
-      (version (git-version "1.0" revision commit))
+      (version (make-git-version "1.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
-- 
2.50.1