all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kei Kebreau <kkebreau@posteo.net>
To: 29496@debbugs.gnu.org
Cc: Kei Kebreau <kkebreau@posteo.net>
Subject: [bug#29496] [PATCH] doc: Update the example VCS snapshot package definition.
Date: Tue, 28 Nov 2017 18:38:53 -0500	[thread overview]
Message-ID: <20171128233853.14438-1-kkebreau@posteo.net> (raw)

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.
---
 doc/guix.texi | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 777ca2738..0bd6b6a79 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19880,16 +19880,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
-- 
2.15.0

             reply	other threads:[~2017-11-28 23:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 23:38 Kei Kebreau [this message]
2017-11-30 17:07 ` [bug#29496] [PATCH] doc: Update the example VCS snapshot package definition Ludovic Courtès
2017-11-30 17:21   ` bug#29496: " Kei Kebreau
2017-11-30 23:14   ` [bug#29496] " Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171128233853.14438-1-kkebreau@posteo.net \
    --to=kkebreau@posteo.net \
    --cc=29496@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.