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

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

find gnu/packages/ -type f -name "d*.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/darwin.scm           | 6 +++---
 gnu/packages/databases.scm        | 2 +-
 gnu/packages/datastructures.scm   | 5 +++--
 gnu/packages/debian.scm           | 2 +-
 gnu/packages/debug.scm            | 8 ++++----
 gnu/packages/dictionaries.scm     | 4 ++--
 gnu/packages/disk.scm             | 8 ++++----
 gnu/packages/display-managers.scm | 8 ++++----
 gnu/packages/djvu.scm             | 4 ++--
 gnu/packages/dlang.scm            | 2 +-
 gnu/packages/dns.scm              | 7 ++++---
 gnu/packages/docbook.scm          | 5 +++--
 gnu/packages/docker.scm           | 2 +-
 gnu/packages/documentation.scm    | 2 +-
 gnu/packages/dotnet.scm           | 8 ++++----
 15 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/gnu/packages/darwin.scm b/gnu/packages/darwin.scm
index 88990d04042..42d4868323a 100644
--- a/gnu/packages/darwin.scm
+++ b/gnu/packages/darwin.scm
@@ -35,9 +35,9 @@ (define-public cctools
         (commit "04663295d0425abfac90a42440a7ec02d7155fea"))
     (package
       (name "cctools")
-      (version (git-version (string-append cctools-version
-                                           "-ld64-"
-                                           ld64-version)
+      (version (make-git-version (string-append cctools-version
+                                                "-ld64-"
+                                                ld64-version)
                             revision
                             commit))
       (source
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index e66b640ce79..4977b778939 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -2208,7 +2208,7 @@ (define-public sqlcrush
         (revision "2"))
     (package
       (name "sqlcrush")
-      (version (git-version "0.1.5" revision commit))
+      (version (make-git-version "0.1.5" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/datastructures.scm b/gnu/packages/datastructures.scm
index 485cd03b7dc..8cf5544491b 100644
--- a/gnu/packages/datastructures.scm
+++ b/gnu/packages/datastructures.scm
@@ -45,7 +45,7 @@ (define-public coucal
         (revision "1"))
     (package
       (name "coucal")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -74,7 +74,8 @@ (define-public coucal
             (replace 'install           ;no install target
               (lambda _
                 (let ((doc (string-append #$output
-                                          "/share/doc/" #$name "-" #$version)))
+                                          "/share/doc/" #$name "-"
+                                          #$(package-version this-package))))
                   (install-file "README.md" doc))
                 (for-each (lambda (f) (install-file f #$output))
                           (find-files "." "(coucal|murmurhash)"))))
diff --git a/gnu/packages/debian.scm b/gnu/packages/debian.scm
index c54473f6f1c..2b66148c243 100644
--- a/gnu/packages/debian.scm
+++ b/gnu/packages/debian.scm
@@ -593,7 +593,7 @@ (define-public apt-mirror
         (revision "1"))
     (package
       (name "apt-mirror")
-      (version (git-version "0.5.4" revision commit))
+      (version (make-git-version "0.5.4" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index f1bda7a1ea7..e05003bd46d 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -134,7 +134,7 @@ (define-public c-reduce
         (revision "0"))
     (package
       (name "c-reduce")
-      (version (git-version "2.10.0" revision commit))
+      (version (make-git-version "2.10.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -606,7 +606,7 @@ (define-public stress-make
         (revision "2"))                 ;No official source distribution
     (package
       (name "stress-make")
-      (version (git-version "1.0" revision commit))
+      (version (make-git-version "1.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -838,7 +838,7 @@ (define-public libbacktrace
         (commit "cdb64b688dda93bbbacbc2b1ccf50ce9329d4748"))
     (package
       (name "libbacktrace")
-      (version (git-version "1.0" revision commit))
+      (version (make-git-version "1.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -951,7 +951,7 @@ (define-public mspdebug
         (revision "0"))
     (package
       (name "mspdebug")
-      (version (git-version "0.25" revision commit))
+      (version (make-git-version "0.25" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index f51ed24111c..cfeadf45d8c 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -441,7 +441,7 @@ (define-public skk-jisyo
         (revision "0"))
     (package
       (name "skk-jisyo")
-      (version (git-version "0" revision commit))
+      (version (make-git-version "0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -529,7 +529,7 @@ (define-public freedict-dictionaries
         (revision "0"))
     (package
       (name "freedict-dictionaries")
-      (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/disk.scm b/gnu/packages/disk.scm
index a4df50bd4b6..cdff1707693 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -134,7 +134,7 @@ (define-public bcache-tools
         (revision "0"))
     (package
       (name "bcache-tools")
-      (version (git-version "1.1" revision commit))
+      (version (make-git-version "1.1" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -419,7 +419,7 @@ (define-public gpart
         (revision "0"))
     (package
       (name "gpart")
-      (version (git-version "0.3" revision commit))
+      (version (make-git-version "0.3" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -433,7 +433,7 @@ (define-public gpart
       (arguments
        `(#:configure-flags
          (list (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
-                              ,name "-" ,version))
+                              ,name "-" ,(package-version this-package)))
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'skip-premature-configuration
@@ -1663,7 +1663,7 @@ (define-public mmc-utils
         (revision "1"))
     (package
       (name "mmc-utils")
-      (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/display-managers.scm b/gnu/packages/display-managers.scm
index 2ec3cb70e1c..f6c4f263951 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -175,7 +175,7 @@ (define-public abstractdark-sddm-theme
         (revision "0"))
     (package
       (name "abstractdark-sddm-theme")
-      (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
@@ -200,7 +200,7 @@ (define-public dexy-color-sddm-theme
         (revision "0"))
     (package
       (name "dexy-color-sddm-theme")
-      (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
@@ -551,7 +551,7 @@ (define-public lightdm-mini-greeter
     (package
       (name "lightdm-mini-greeter")
       ;; Version 0.5.1 release in 2021, so we use a recent commit.
-      (version (git-version "0.5.1" revision commit))
+      (version (make-git-version "0.5.1" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -600,7 +600,7 @@ (define-public lightdm-tiny-greeter
     (package
       (name "lightdm-tiny-greeter")
       ;; Version 1.2 release in 2021, so we use a recent commit.
-      (version (git-version "1.2" revision commit))
+      (version (make-git-version "1.2" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/djvu.scm b/gnu/packages/djvu.scm
index 324febbf10f..b51c1f09196 100644
--- a/gnu/packages/djvu.scm
+++ b/gnu/packages/djvu.scm
@@ -296,7 +296,7 @@ (define-public didjvu
         (commit "43e2735d0b3575ca04e82a427dca88bc68fa4931"))
     (package
       (name "didjvu")
-      (version (git-version "0.10.2" revision commit))
+      (version (make-git-version "0.10.2" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -357,7 +357,7 @@ (define-public ocrodjvu
         (commit "0dd3364462fc77d5674b4457fcc8230835323c30"))
     (package
       (name "ocrodjvu")
-      (version (git-version "0.12" revision commit))
+      (version (make-git-version "0.12" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 1fd1c8d58cb..18d1a1c7a67 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -111,7 +111,7 @@ (define-public gdmd
         (revision "1"))
     (package
       (name "gdmd")
-      (version (git-version "0.1.0" revision commit))
+      (version (make-git-version "0.1.0" revision commit))
       (source
         (origin
           (method git-fetch)
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 7cb86ad1448..7e754f13b25 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -100,7 +100,7 @@ (define-public cloudflare-cli
         (revision "1"))
     (package
       (name "cloudflare-cli")
-      (version (git-version "0.0.0" revision commit))
+      (version (make-git-version "0.0.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -1156,7 +1156,7 @@ (define-public public-suffix-list
   (let ((commit "d2d3e2e36a8f2b68c4f09e8c87f4f1d685cbf5e7"))
     (package
       (name "public-suffix-list")
-      (version (git-version "0" "2" commit))
+      (version (make-git-version "0" "2" commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1175,7 +1175,8 @@ (define-public public-suffix-list
              ;; so that if multiple versions are ever installed in the same
              ;; profile, they will not conflict.
              #~'(("public_suffix_list.dat"
-                  #$(string-append "/share/public-suffix-list-" version "/")))))
+                  #$(string-append "/share/public-suffix-list-"
+                                   (package-version this-package) "/")))))
       (home-page "https://publicsuffix.org/")
       (synopsis "Database of current and historical DNS suffixes")
       (description "This is the Public Suffix List maintained by Mozilla.  A
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 49bea0daa13..49f85ec9f8f 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -352,7 +352,7 @@ (define-public docbook-xsl
         (base-version "1.79.2"))
     (package
       (name "docbook-xsl")
-      (version (git-version base-version revision commit))
+      (version (make-git-version base-version revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -381,7 +381,8 @@ (define-public docbook-xsl
                     (sxml simple))
         #:phases
         #~(let ((dest-path (format #f "~a/xml/xsl/~a-~a"
-                                   #$output #$name #$version)))
+                                   #$output #$name
+                                   #$(package-version this-package))))
             (modify-phases %standard-phases
               (replace 'configure
                 (lambda _
diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm
index a0c90ac5aa0..39577c7aaf4 100644
--- a/gnu/packages/docker.scm
+++ b/gnu/packages/docker.scm
@@ -288,7 +288,7 @@ (define docker-libnetwork
         (revision "3"))
     (package
       (name "docker-libnetwork")
-      (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/documentation.scm b/gnu/packages/documentation.scm
index dc01277976d..1acceae766b 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -512,7 +512,7 @@ (define-public stddoc
         (revision "1"))
     (package
       (name "stddoc")
-      (version (git-version "1.0.2" revision commit))
+      (version (make-git-version "1.0.2" revision commit))
       (home-page "https://github.com/r-lyeh/stddoc.c")
       (source
        (origin
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index b22721075a7..14326801078 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -71,7 +71,7 @@ (define-public pnet-git
         (revision "0"))
     (package
       (name "pnet-git")
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -188,7 +188,7 @@ (define-public pnetlib-git
         (revision "0"))
     (package
       (name "pnetlib-git")
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1394,7 +1394,7 @@ (define-public mono-pre-5.8.0
         (revision "0"))
     (package
       (inherit mono-5.4.0)
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (name "mono")
       (source (origin
                 (method git-fetch)
@@ -1598,7 +1598,7 @@ (define-public mono-pre-5.10.0
         (revision "0"))
     (package
       (inherit mono-5.8.0)
-      (version (git-version version revision commit))
+      (version (make-git-version version revision commit))
       (name "mono")
       (source (origin
                 (method git-fetch)
-- 
2.50.1