gnu: guix: Rework 0.4 hack to gracefully handle lack of tarball.

* gnu/packages/package-management.scm (guix-0.4): Fall back to the
  source of GIUX when the tarball doesn't exist.
This commit is contained in:
Ludovic Courtès 2013-09-25 00:13:06 +02:00
parent 9fcc355529
commit f1dfb7c47c

View file

@ -107,10 +107,16 @@ (define (copy arch)
(define-public guix-0.4
;; XXX: Hack to allow the use of a 0.4ish tarball. This assumes that you
;; have run 'make dist' in your build tree. Remove when 0.4 is out.
(package (inherit guix)
(version "0.4rc")
(source (let ((builddir (dirname
(canonicalize-path
(dirname (search-path %load-path
"guix/config.scm"))))))
(string-append builddir "/guix-0.4.tar.gz")))))
(let* ((builddir (dirname
(canonicalize-path
(dirname (search-path %load-path
"guix/config.scm")))))
(tarball (string-append builddir "/guix-0.4.tar.gz")))
(package (inherit guix)
(version "0.4rc")
(source (if (file-exists? tarball)
tarball
(begin
(format (current-error-port)
"warning: 'guix-0.4.tar.gz' not found~%")
(package-source guix)))))))