Browse Source

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.
gn-latest-20200428
Ludovic Courtès 8 years ago
parent
commit
f1dfb7c47c
1 changed files with 13 additions and 7 deletions
  1. +13
    -7
      gnu/packages/package-management.scm

+ 13
- 7
gnu/packages/package-management.scm View File

@ -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)))))))

Loading…
Cancel
Save