From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKDP-0004I8-No for guix-patches@gnu.org; Thu, 15 Mar 2018 00:10:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKDL-0008Qs-Az for guix-patches@gnu.org; Thu, 15 Mar 2018 00:10:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ewKDL-0008QZ-7T for guix-patches@gnu.org; Thu, 15 Mar 2018 00:10:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ewKDL-0000xP-1G for guix-patches@gnu.org; Thu, 15 Mar 2018 00:10:03 -0400 Subject: [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz. Resent-Message-ID: From: Chris Marusich Date: Thu, 15 Mar 2018 05:09:09 +0100 Message-Id: <20180315040915.5556-2-cmmarusich@gmail.com> In-Reply-To: <20180315040915.5556-1-cmmarusich@gmail.com> References: <20180222102933.4978-1-cmmarusich@gmail.com> <20180315040915.5556-1-cmmarusich@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: bug#30572 <30572@debbugs.gnu.org> Cc: Chris Marusich * 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 ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2017 Efraim Flashner +;;; Copyright © 2018 Chris Marusich ;;; ;;; 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