GNU bug report logs -
#30572
[PATCH 0/7] Add "guix system docker-image" command
Previous Next
Reported by: Chris Marusich <cmmarusich <at> gmail.com>
Date: Thu, 22 Feb 2018 10:31:02 UTC
Severity: normal
Tags: patch
Done: Chris Marusich <cmmarusich <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #101 received at 30572 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/bootstrap.scm (bootstrap-binary): New procedure.
(%bootstrap-bash, %bootstrap-mkdir, %bootstrap-tar, %bootstrap-xz):
Use it to create these new packages, and export them.
---
gnu/packages/bootstrap.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 27f2053c4..fff294971 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw <at> netris.org>
;;; Copyright © 2017 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2018 Chris Marusich <cmmarusich <at> gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -43,6 +44,10 @@
bootstrap-guile-origin
%bootstrap-guile
+ %bootstrap-bash
+ %bootstrap-mkdir
+ %bootstrap-tar
+ %bootstrap-xz
%bootstrap-coreutils&co
%bootstrap-binutils
%bootstrap-gcc
@@ -345,6 +350,35 @@ $out/bin/guile --version~%"
(home-page #f)
(license lgpl3+))))
+(define (bootstrap-binary program-name)
+ (package
+ (name (string-append program-name "-bootstrap"))
+ ;; The version may differ depending on the program.
+ (version "unknown")
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:builder (let ((out (assoc-ref %outputs "out"))
+ (program (assoc-ref %build-inputs ,program-name)))
+ (mkdir out)
+ (mkdir (string-append out "/bin"))
+ (symlink program (string-append out "/bin/" ,program-name)))))
+ (inputs `((,program-name ,(search-bootstrap-binary program-name (%current-system)))))
+ (description (string-append "The bootstrap " program-name "."))
+ (synopsis (string-append "The bootstrap " program-name "."))
+ (license gpl3+)
+ (home-page #f)))
+
+;; These trivial packages provide individual binaries that are also included
+;; in %bootstrap-coreutils&co. However, these packages are more minimal than
+;; %bootstrap-coreutils&co, and they do not require network access to build
+;; because these specific binaries are included in the Guix source tree.
+(define %bootstrap-bash (bootstrap-binary "bash"))
+(define %bootstrap-mkdir (bootstrap-binary "mkdir"))
+(define %bootstrap-tar (bootstrap-binary "tar"))
+(define %bootstrap-xz (bootstrap-binary "xz"))
+
(define %bootstrap-coreutils&co
(package-from-tarball "bootstrap-binaries"
(lambda (system)
--
2.15.1
This bug report was last modified 7 years and 62 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.