summaryrefslogtreecommitdiff
path: root/guix/git-download.scm
diff options
context:
space:
mode:
authorDavid Craven <david@craven.ch>2017-01-02 17:49:07 +0100
committerDavid Craven <david@craven.ch>2017-01-04 11:44:07 +0100
commitee17a9e06e636400e3354796a42ac445dbcc8f96 (patch)
treebe1e5dfa08280e4e3c0a426904d6e563d9161318 /guix/git-download.scm
parent9b4ec5730a8739a55cce25adc8120b28035baebc (diff)
downloadgnu-guix-ee17a9e06e636400e3354796a42ac445dbcc8f96.tar
gnu-guix-ee17a9e06e636400e3354796a42ac445dbcc8f96.tar.gz
git-download: Add some helpers.
* guix/git-download.scm (git-version, git-file-name): New variables.
Diffstat (limited to 'guix/git-download.scm')
-rw-r--r--guix/git-download.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/guix/git-download.scm b/guix/git-download.scm
index 81d1d4fbf6..fca44f552a 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