From b006ba50384f9cb517fa881299160adba0aaca9e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 20 Jul 2016 22:40:20 +0200 Subject: pull: Update the version string. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by Tomáš Čech . This allows 'guix --version' to return something that better represents what version is being used. * build-aux/build-self.scm (date-version-string): New procedure. (build): Add #:version. [builder]: Pass it to 'build-guix' as #:package-version. --- build-aux/build-self.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'build-aux') diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index c673912af5..59028305e7 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -21,6 +21,7 @@ #:use-module (guix) #:use-module (guix config) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-19) #:export (build)) ;;; Commentary: @@ -70,8 +71,16 @@ (lambda (file) (string-append (dirname file) "/..")))) + +(define (date-version-string) + "Return the current date and hour in UTC timezone, for use as a poor +person's version identifier." + ;; XXX: Replace with a Git commit id. + (date->string (current-date 0) "~Y~m~d.~H")) + ;; The procedure below is our return value. -(define* (build source #:key verbose? +(define* (build source + #:key verbose? (version (date-version-string)) #:allow-other-keys #:rest rest) "Return a derivation that unpacks SOURCE into STORE and compiles Scheme @@ -106,7 +115,7 @@ files." #:sbindir #$sbindir #:package-name #$%guix-package-name - #:package-version #$%guix-version + #:package-version #$version #:bug-report-address #$%guix-bug-report-address #:home-page-url #$%guix-home-page-url -- cgit 1.4.1