summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-25 00:13:06 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-25 00:13:06 +0200
commitf1dfb7c47c2cb7ca972d0379640838719af9a118 (patch)
treea7b99041c42c4d44ff5d33a4bd936ce951392723 /gnu
parent9fcc355529838f86f963dbdd7e47c0308df95a29 (diff)
downloadguix-f1dfb7c47c2cb7ca972d0379640838719af9a118.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/package-management.scm20
1 files changed, 13 insertions, 7 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index e19ce04716..ccd15cef6f 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -107,10 +107,16 @@ Guix is based on the Nix package manager.")
 (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)))))))