summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorKei Kebreau <kkebreau@posteo.net>2017-11-28 18:28:48 -0500
committerKei Kebreau <kkebreau@posteo.net>2017-11-30 12:19:29 -0500
commit9ce07f2dbafe068aea81e79decc4cfc146a48259 (patch)
tree5cb1c5de296a92269f6274433f50fcdda8f3de2a /doc
parent34a28c13f55ef25423662c72473a1247f7e21375 (diff)
downloadguix-9ce07f2dbafe068aea81e79decc4cfc146a48259.tar.gz
doc: Update the example VCS snapshot package definition.
In commit ee17a9e06e636400e3354796a42ac445dbcc8f96, the helpers git-version
and git-file-name removed the need to build version and file name strings
manually for packages that use VCS snapshots.

doc/guix.texi (Version Numbers): Use git-version and git-file-name.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi6
1 files changed, 2 insertions, 4 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 88764437a6..cad2b86e76 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19898,16 +19898,14 @@ definition may look like this:
   (let ((commit "c3f29bc928d5900971f65965feaae59e1272a3f7")
         (revision "1"))          ;Guix package revision
     (package
-      (version (string-append "0.9-" revision "."
-                              (string-take commit 7)))
+      (version (git-version "0.9" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
                       (url "git://example.org/my-package.git")
                       (commit commit)))
                 (sha256 (base32 "1mbikn@dots{}"))
-                (file-name (string-append "my-package-" version
-                                          "-checkout"))))
+                (file-name (git-file-name name version))))
       ;; @dots{}
       )))
 @end example