[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/06: gnu: bootstrap: Add support for snippets to 'package-from-tarball

From: Mark H. Weaver
Subject: 01/06: gnu: bootstrap: Add support for snippets to 'package-from-tarball'.
Date: Wed, 07 Jan 2015 17:33:58 +0000

mhw pushed a commit to branch core-updates
in repository guix.

commit 2959dbe935f17bdcc19405067aa7353d8cc98c48
Author: Mark H Weaver <address@hidden>
Date:   Wed Dec 31 03:38:26 2014 -0500

    gnu: bootstrap: Add support for snippets to 'package-from-tarball'.
    * gnu/packages/bootstrap.scm (package-from-tarball): Add new keyword
      argument #:snippet.
 gnu/packages/bootstrap.scm |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 5a19783..05444dd 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <address@hidden>
+;;; Copyright © 2014, 2015 Mark H Weaver <address@hidden>
 ;;; This file is part of GNU Guix.
@@ -87,10 +88,13 @@
                      (patch patch))
                     (origin-patches source))))))
-(define (package-from-tarball name source program-to-test description)
+(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."
+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."
     (name name)
     (version "0")
@@ -112,6 +116,7 @@ check whether everything is alright."
            (with-directory-excursion out
              (and (zero? (system* tar "xvf"
                                   (string-append builddir "/binaries.tar")))
+                  ,@(if snippet (list snippet) '())
                   (zero? (system* (string-append "bin/" ,program-to-test)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]