diff options
author | Jan Nieuwenhuizen <janneke@gnu.org> | 2018-09-09 12:32:07 +0200 |
---|---|---|
committer | Jan Nieuwenhuizen <janneke@gnu.org> | 2018-09-23 09:46:25 +0200 |
commit | dbabfc470d568125d523bbd1942e421a14911f6d (patch) | |
tree | d26be04dcf66b979057878e5a6a52b4a5931b1c5 /gnu/packages/bootstrap.scm | |
parent | 517af02ea1de95ecbde3fa265f3e40b4e44c0eca (diff) | |
download | guix-dbabfc470d568125d523bbd1942e421a14911f6d.tar.gz |
guix: package-from-tarball: Allow PROGRAM-TO-TEST to be #f.
* gnu/packages/bootstrap.scm (package-from-tarball): Allow PROGRAM-TO-TEST to be #f.
Diffstat (limited to 'gnu/packages/bootstrap.scm')
-rw-r--r-- | gnu/packages/bootstrap.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index fb6e8db88a..c8d4e7e85f 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -97,10 +98,10 @@ (define* (package-from-tarball name source program-to-test description #:key snippet) "Return a package that correspond to the extraction of SOURCE. -PROGRAM-TO-TEST is a program to run after extraction of SOURCE, to check -whether everything is alright. If SNIPPET is provided, it is evaluated after -extracting SOURCE. SNIPPET should raise an exception to signal an error; its -return value is ignored." +PROGRAM-TO-TEST is #f or a string: the program to run after extraction of +SOURCE to check whether everything is alright. If SNIPPET is provided, it is +evaluated after extracting SOURCE. SNIPPET should return true if successful, +or false to signal an error." (package (name name) (version "0") @@ -123,8 +124,9 @@ return value is ignored." (invoke tar "xvf" (string-append builddir "/binaries.tar")) ,@(if snippet (list snippet) '()) - (invoke (string-append "bin/" ,program-to-test) - "--version")))))) + (or (not ,program-to-test) + (invoke (string-append "bin/" ,program-to-test) + "--version"))))))) (inputs `(("tar" ,(search-bootstrap-binary "tar" (%current-system))) ("xz" ,(search-bootstrap-binary "xz" (%current-system))) |