[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/15: guix: package-from-tarball: Allow PROGRAM-TO-TEST to be #f.
From: |
Jan Nieuwenhuizen |
Subject: |
06/15: guix: package-from-tarball: Allow PROGRAM-TO-TEST to be #f. |
Date: |
Thu, 20 Sep 2018 10:06:01 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit a71ce4ea39e6f32373b8c73eb9dcb3d71c3a3dec
Author: Jan Nieuwenhuizen <address@hidden>
Date: Sun Sep 9 12:32:07 2018 +0200
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.
---
gnu/packages/bootstrap.scm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index fb6e8db..c8d4e7e 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
<address@hidden>
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <address@hidden>
;;; Copyright © 2017 Efraim Flashner <address@hidden>
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <address@hidden>
;;;
;;; 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)))
- branch wip-bootstrap created (now 78b8c9a), Jan Nieuwenhuizen, 2018/09/20
- 02/15: bootstrap: %bootstrap-inputs+toolchain: Replace %bootstrap-inputs., Jan Nieuwenhuizen, 2018/09/20
- 05/15: bootstrap: static-bash-for-glibc: Consider %current-system at run time., Jan Nieuwenhuizen, 2018/09/20
- 08/15: gnu: Add linux-libre-headers-bootstrap-tarball., Jan Nieuwenhuizen, 2018/09/20
- 04/15: bootstrap: Use thunk for inputs in package-with-explicit-inputs., Jan Nieuwenhuizen, 2018/09/20
- 06/15: guix: package-from-tarball: Allow PROGRAM-TO-TEST to be #f.,
Jan Nieuwenhuizen <=
- 07/15: guix: copy-linux-headers: Extract procedure, add headers., Jan Nieuwenhuizen, 2018/09/20
- 11/15: bootstrap: bison-boot0: Do not use `ranlib -D'., Jan Nieuwenhuizen, 2018/09/20
- 12/15: bootstrap: perl-boot0: Disable validate-runpath?., Jan Nieuwenhuizen, 2018/09/20
- 09/15: bootstrap: Add Mes bootstrap seeds., Jan Nieuwenhuizen, 2018/09/20
- 14/15: doc: Describe the Reduced Binary Seed bootstrap., Jan Nieuwenhuizen, 2018/09/20
- 13/15: bootstrap: Replace GNU toolchain seeds with Mes for i686-linux., Jan Nieuwenhuizen, 2018/09/20
- 01/15: bootstrap: %bootstrap-inputs: Wrap input lists into thunks., Jan Nieuwenhuizen, 2018/09/20
- 03/15: gnu: m4-boot0: New variable., Jan Nieuwenhuizen, 2018/09/20
- 15/15: bootstrap: Reduced Binary Seed bootstrap for x86_64 too., Jan Nieuwenhuizen, 2018/09/20
- 10/15: bootstrap: Add Mes bootstrap., Jan Nieuwenhuizen, 2018/09/20