guix: mes.git: Add git hash to version.

* guix.scm (mes.git): Add git hash to version.
This commit is contained in:
Jan Nieuwenhuizen 2017-06-03 21:18:53 +02:00
parent 4d1df9cbcb
commit 993181ad65

View file

@ -129,11 +129,14 @@ prototype in C and a Nyacc-based C compiler in [Guile] Scheme.")
(license gpl3+)))) (license gpl3+))))
(define-public mes.git (define-public mes.git
(let ((version "0.6")
(revision "0")
(commit (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ))))
(package (package
(inherit mes) (inherit mes)
(name "mes") (name "mes.git")
(version "git") (version (string-append version "-" revision "." (string-take commit 7)))
(source (local-file %source-dir #:recursive? #t #:select? git-file?)))) (source (local-file %source-dir #:recursive? #t #:select? git-file?)))))
;; Return it here so `guix build/environment/package' can consume it directly. ;; Return it here so `guix build/environment/package' can consume it directly.
mes.git mes.git