guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: git-download: Add some helpers.


From: David Craven
Subject: 01/03: git-download: Add some helpers.
Date: Wed, 4 Jan 2017 10:44:37 +0000 (UTC)

dvc pushed a commit to branch master
in repository guix.

commit ee17a9e06e636400e3354796a42ac445dbcc8f96
Author: David Craven <address@hidden>
Date:   Mon Jan 2 17:49:07 2017 +0100

    git-download: Add some helpers.
    
    * guix/git-download.scm (git-version, git-file-name): New variables.
---
 guix/git-download.scm |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/guix/git-download.scm b/guix/git-download.scm
index 81d1d4f..fca44f5 100644
--- a/guix/git-download.scm
+++ b/guix/git-download.scm
@@ -30,7 +30,9 @@
             git-reference-commit
             git-reference-recursive?
 
-            git-fetch))
+            git-fetch
+            git-version
+            git-file-name))
 
 ;;; Commentary:
 ;;;
@@ -110,4 +112,12 @@ HASH-ALGO (a symbol).  Use NAME as the file name, or a 
generic name if #f."
                       #:guile-for-build guile
                       #:local-build? #t)))
 
+(define (git-version version revision commit)
+  "Return the version string for packages using git-download."
+  (string-append version "-" revision "." (string-take commit 7)))
+
+(define (git-file-name name version)
+  "Return the file-name for packages using git-download."
+  (string-append name "-" version "-checkout"))
+
 ;;; git-download.scm ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]