mhw pushed a commit to branch wip-armhf
in repository guix.
commit bf2e7748d7c9fb0095e0eba728bef4677d225262
Author: Mark H Weaver <[email protected]>
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 | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 5a19783..b3b8de9 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 <[email protected]>
+;;; Copyright © 2014 Mark H Weaver <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -87,7 +88,8 @@
(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 #f))
"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."
@@ -113,7 +115,8 @@ check whether everything is alright."
(and (zero? (system* tar "xvf"
(string-append builddir "/binaries.tar")))
(zero? (system* (string-append "bin/" ,program-to-test)
- "--version"))))))))
+ "--version"))
+ ,@(if snippet (list snippet) '())))))))
(inputs
`(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
("xz" ,(search-bootstrap-binary "xz" (%current-system)))