From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:36487) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyffj-0000o3-6L for guix-patches@gnu.org; Mon, 03 Feb 2020 12:38:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyfff-0003B6-Mi for guix-patches@gnu.org; Mon, 03 Feb 2020 12:38:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36211) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iyffe-00039H-Ar for guix-patches@gnu.org; Mon, 03 Feb 2020 12:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iyffe-00030l-78 for guix-patches@gnu.org; Mon, 03 Feb 2020 12:38:02 -0500 Subject: [bug#38390] [bug #38390] Building bootstrap Gash and Gash-Utils References: <87tv6qoank.fsf@gnu.org> Resent-Message-ID: From: Timothy Sample Date: Mon, 03 Feb 2020 12:37:04 -0500 In-Reply-To: Ludovic =?UTF-8?Q?Court=C3=A8s's?= message of "Sun\, 08 Dec 2019 23\:20\:11 +0100 \(8 weeks\, 18 hours\, 35 minutes ago\)" Message-ID: <87lfpj7etb.fsf@ngyro.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 38390@debbugs.gnu.org, Jan Nieuwenhuizen --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, (CC=E2=80=99ing Jan and bug#38390.) We=E2=80=99re nearing a release for Gash-Utils, and while working on it I m= ade some changes to how the bootstrap Gash and Gash-Utils are built (on the wip-bootstrap branch.) Jan suggested that we get your opinion on the changes, as you are behind the current '%bootstrap-guile+guild' approach. The very short story is that I found that the Scheme GZip code is being maintained and works out-of-the-box on Guile 2.0.9 [1]. This made me unsure about copying the code into Gash-Utils when maybe we could just use it as a dependency. Then, I realized that the library included a simple Tar reader, and wondered how simple a program could be that could handle 'tar xvf gash.tar.gz'. It turns out pretty simple! So I put the program and all its dependencies in an a-list with a little loop that writes them to disk, and made a self-extracting Scheme script that can unpack compressed tarballs [2]. [1] https://github.com/weinholt/compression [2] https://git.ngyro.com/bootar/ The other thing is that I always intended for Gash and Gash-Utils to be built with a loop calling =E2=80=9Ccompile-file=E2=80=9D. This avoids the = need for =E2=80=9Cguild=E2=80=9D which in turn avoids =E2=80=9Cbash=E2=80=9D (AIUI). These patches update Gash-Utils, replace the binary =E2=80=9Ctar=E2=80=9D w= ith my self-extracting Scheme implementation, and replace =E2=80=9Cguild=E2=80=9D = with =E2=80=9Ccompile-file=E2=80=9D. I think this simplifies the bootstrap proc= esses, and I really like getting rid of the references to =E2=80=9Ctar=E2=80=9D, =E2=80= =9Cbash=E2=80=9D, and =E2=80=9Cxz=E2=80=9D (even though they are needed for the bootstrap Guile, it feels nice to quarantine them there). WDYT? -- Tim --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Rename-gash-core-utils-to-gash-utils.patch >From 33614593c2a212ac99cc126755efebcb0574909c Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Mon, 3 Feb 2020 11:26:35 -0500 Subject: [PATCH 1/3] Rename 'gash-core-utils' to 'gash-utils'. * gnu/packages/shells.scm (gash-core-utils): Rename this... (gash-utils): ...to this. * gnu/packages/commencement.scm (gash-core-utils): Rename this... (gash-utils): ...to this and update the parent package reference. (%boot-gash-inputs): Update reference. --- gnu/packages/commencement.scm | 10 +++++----- gnu/packages/shells.scm | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 1c62fcfae7..43533b4525 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -89,7 +89,7 @@ (define %bootstrap-guile+guild ;; This package combines %bootstrap-guile with guild, which is not included ;; in %bootstrap-guile. Guild is needed to build gash-boot and - ;; gash-core-utils-boot because it is dependency of the Guile build system. + ;; gash-utils-boot because it is dependency of the Guile build system. (package (name "guile-bootstrap+guild") (version "2.0") @@ -225,10 +225,10 @@ (install-file "scripts/bash" bin) #t)))))))) -(define gash-core-utils-boot +(define gash-utils-boot (package - (inherit gash-core-utils) - (name "gash-core-utils-boot") + (inherit gash-utils) + (name "gash-utils-boot") (version "0.0.214-fc1b") (source (bootstrap-origin (origin @@ -387,7 +387,7 @@ (define (%boot-gash-inputs) `(("bash" , gash-boot) ; gnu-build-system wants "bash" - ("coreutils" , gash-core-utils-boot) + ("coreutils" , gash-utils-boot) ("guile" ,%bootstrap-guile) ("guile+guild" ,%bootstrap-guile+guild))) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 3d2975fe14..ea61e7b2f8 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -827,9 +827,9 @@ library for parsing shell scripts. Gash is designed to bootstrap Bash as part of the Guix bootstrap process.") (license gpl3+))) -(define-public gash-core-utils +(define-public gash-utils (package - (name "gash-core-utils") + (name "gash-utils") (version "0.0.211-789c3") (source (origin (method url-fetch) -- 2.24.1 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0002-Simplify-bootstrap-Gash-and-Gash-Utils.patch Content-Transfer-Encoding: quoted-printable >From 2cec50928a4ff67df363322d2adfb6aaa5aedc83 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Mon, 3 Feb 2020 10:51:07 -0500 Subject: [PATCH 2/3] Simplify bootstrap Gash and Gash-Utils. This change does three things. First Gash-Utils is updated to 0.1.0-preview. Then, the bootstrap Gash and Gash-Utils packages are arranged to be built without using 'guild'. Finally, instead of using a binary 'tar' via 'bootstrap-executable' to extract Gash and Gash-Utils, a self-extracting Scheme implementation of 'tar' and 'gzip' is used instead. These three changes need to happen in concert to avoid breaking the bootstrap process. * gnu/packages/shells.scm (gash-utils): Update to 0.1.0-preview. * gnu/packages/commencement.scm (make-bootstrap-phases): New procedure. (bootar): New variable. (gash-boot): Replace 'tar', and 'xz' with 'bootar'; remove 'bash' and 'guile-source'; do not use 'guile-build-system' but rather 'gnu-build-system' with its phases processed by 'make-bootstrap-phases'; disable tests. (gash-utils-boot): Likewise. (%boot-gash-inputs): Add 'bootar'; replace '%bootstrap-guile+guild' with '%bootstrap-guile'. (mes-boot): In the configure phase, do not reference 'GUILE_LOAD_PATH' as it is no longer set. --- gnu/packages/commencement.scm | 431 ++++++++++++++++------------------ gnu/packages/shells.scm | 8 +- 2 files changed, 206 insertions(+), 233 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 43533b4525..914b3f2a8d 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -7,6 +7,7 @@ ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2018, 2019 Jan (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2019 Marius Bakke +;;; Copyright =C2=A9 2020 Timothy Sample ;;; ;;; This file is part of GNU Guix. ;;; @@ -53,7 +54,6 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module (guix build-system guile) #:use-module (guix build-system trivial) #:use-module (guix memoization) #:use-module (guix utils) @@ -144,252 +144,226 @@ (variable "GUILE_LOAD_COMPILED_PATH") (files '("lib/guile/2.0/site-ccache"))))))) =20 +(define (make-bootstrap-phases version scripts modules) + "Create a form that modifies the standard GNU build phases so that +they build simple Guile programs using only the bootstrap Guile. The +'.in' files in the directory MODULES are configured with VERSION, the +'.in' files in the directory SCRIPTS are configured with the bootstrap +Guile and its module and object directories, and the Scheme files in the +directory MODULES are compiled and installed." + `(modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (guile-dir (assoc-ref inputs "guile")) + (guile (string-append guile-dir "/bin/guile")) + (moddir (string-append out "/share/guile/site/" + (effective-version))) + (godir (string-append out "/lib/guile/" + (effective-version) + "/site-ccache"))) + (for-each (lambda (template) + (format #t "Configuring ~a~%" template) + (let ((target (string-drop-right template 3))) + (copy-file template target) + (substitute* target + (("@VERSION@") ,version)))) + (find-files ,modules + (lambda (fn st) + (string-suffix? ".in" fn)))) + (for-each (lambda (template) + (format #t "Configuring ~a~%" template) + (let ((target (string-drop-right template 3))) + (copy-file template target) + (substitute* target + (("@GUILE@") guile) + (("@MODDIR@") moddir) + (("@GODIR@") godir)) + (chmod target #o755))) + (find-files ,scripts + (lambda (fn st) + (string-suffix? ".in" fn)))) + #t))) + (replace 'build + (lambda _ + (add-to-load-path (getcwd)) + (for-each (lambda (scm) + (let* ((base (string-drop-right scm 4)) + (go (string-append base ".go")) + (dir (dirname scm))) + (format #t "Compiling ~a~%" scm) + (compile-file scm #:output-file go))) + (find-files ,modules "\\.scm$")) + #t)) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (guile-dir (assoc-ref inputs "guile")) + (guile (string-append guile-dir "/bin/guile")) + (moddir (string-append out "/share/guile/site/" + (effective-version))) + (godir (string-append out "/lib/guile/" + (effective-version) + "/site-ccache"))) + (for-each (lambda (scm) + (let* ((base (string-drop-right scm 4)) + (go (string-append base ".go")) + (dir (dirname scm))) + (format #t "Installing ~a~%" scm) + (install-file scm (string-append moddir "/" dir)) + (format #t "Installing ~a~%" go) + (install-file go (string-append godir "/" dir)))) + (find-files ,modules "\\.scm$")) + (for-each (lambda (script) + (format #t "Installing ~a~%" script) + (install-file script (string-append out "/bin"))) + (find-files ,scripts + (lambda (fn st) + (executable-file? fn)))) + #t))))) + +(define bootar + (package + (name "bootar") + (version "1") + (source (origin + (method url-fetch) + (uri "https://files.ngyro.com/tmp/bootar-1.ses") + (sha256 + (base32 + "0f37f1lav7y9nf2c6s783z7w4jfrpqrgcksqb028al82f0dn1glv")))) + (build-system gnu-build-system) + (arguments + `(#:implicit-inputs? #f + #:tests? #f + #:guile ,%bootstrap-guile + #:phases + (modify-phases ,(make-bootstrap-phases version "scripts" ".") + (replace 'unpack + (lambda* (#:key inputs #:allow-other-keys) + (let* ((source (assoc-ref inputs "source")) + (guile-dir (assoc-ref inputs "guile")) + (guile (string-append guile-dir "/bin/guile"))) + (invoke guile "--no-auto-compile" source) + (chdir "bootar") + #t)))))) + (inputs `(("guile" ,%bootstrap-guile))) + (home-page "https://git.ngyro.com/bootar") + (synopsis "Tar decompression and extraction in Guile Scheme") + (description "Bootar is a simple Tar extractor written in Guile +Scheme. It supports running 'tar xvf' on uncompressed tarballs or +tarballs that are compressed with BZip2, GZip, or XZ. It also provides +standalone scripts for 'bzip2', 'gzip', and 'xz' that each support +decompression to standard output. + +What makes this special is that Bootar is distributed as a +self-extracting Scheme (SES) program. That is, a little script that +outputs the source code of Bootar. This makes it possible to go from +pure Scheme to Tar and decompression in one easy step.") + (license gpl3+))) + (define gash-boot (package (inherit gash) (name "gash-boot") - (version "0.2.0") - (source (bootstrap-origin - (origin (inherit (package-source gash)) - (modules '((guix build utils) - (srfi srfi-26))) - (snippet - '(begin - ;; Remove Guix'y files that we cannot compile. - (delete-file "guix.scm") - (delete-file-recursively "tests") - #t))))) - (build-system guile-build-system) - (native-inputs `(("bash" ,(bootstrap-executable "bash" (%current-syste= m))) - ("tar" ,(bootstrap-executable "tar" (%current-system)= )) - ("xz" ,(bootstrap-executable "xz" (%current-system))) - ("guile-source" ,(bootstrap-origin - (package-source guile-2.0))))) - (inputs `(("guile" ,%bootstrap-guile+guild))) + (source (origin + (inherit (package-source gash)) + (modules '()))) (arguments `(#:implicit-inputs? #f - #:guile ,%bootstrap-guile+guild + #:tests? #f + #:guile ,%bootstrap-guile #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-guile-source - (lambda _ - (let ((guile-source (assoc-ref %build-inputs "guile-source")) - (bin (string-append (getcwd) "/zee-bin"))) - (mkdir-p bin) - (with-directory-excursion bin - (invoke "tar" "--strip-components=3D2" - - "-xvf" guile-source - (string-append "guile-" - ,(package-version guile-2.0) - "/meta/guild.in")) - (copy-file "guild.in" "guild") - (chmod "guild" #o555)) - #t))) - (add-before 'unpack 'set-path - (lambda _ - (let ((bash (assoc-ref %build-inputs "bash")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (bin (string-append (getcwd) "/zee-bin"))) - (mkdir-p bin) - (setenv "PATH" (string-append bin ":" (getenv "PATH"))) - (copy-file bash (string-append bin "/bash")) - (copy-file bash (string-append bin "/sh")) - (copy-file tar (string-append bin "/tar")) - (copy-file xz (string-append bin "/xz")) - #t))) - (add-after 'build 'build-scripts - (lambda _ - (let* ((guile (assoc-ref %build-inputs "guile")) - (guile (string-append guile "/bin/guile")) - (out (assoc-ref %outputs "out")) - (effective "2.0") - (moddir (string-append out "/share/guile/site/" effect= ive "/")) - (godir (string-append out "/lib/guile/" effective "/si= te-ccache/"))) - (copy-file "scripts/gash.in" "scripts/gash") - (chmod "scripts/gash" #o555) - (substitute* "scripts/gash" - (("@GUILE@") guile) - (("@MODDIR@") moddir) - (("@GODIR") godir)) - #t))) - (add-after 'install 'install-scripts - (lambda _ - (let* ((out (assoc-ref %outputs "out")) - (bin (string-append out "/bin"))) - (install-file "scripts/gash" bin) - (copy-file "scripts/gash" "scripts/sh") - (install-file "scripts/sh" bin) - (copy-file "scripts/gash" "scripts/bash") - (install-file "scripts/bash" bin) - #t)))))))) + (modify-phases ,(make-bootstrap-phases (version) "scripts" "gash") + (add-after 'install 'install-symlinks + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (symlink (string-append out "/bin/gash") + (string-append out "/bin/sh")) + (symlink (string-append out "/bin/gash") + (string-append out "/bin/bash")) + #t)))))) + (inputs `(("guile" ,%bootstrap-guile))) + (native-inputs `(("bootar" ,bootar))))) =20 (define gash-utils-boot (package (inherit gash-utils) (name "gash-utils-boot") - (version "0.0.214-fc1b") - (source (bootstrap-origin - (origin - (method url-fetch) - (uri (string-append "http://lilypond.org/janneke/" - "/gash-core-utils-" version ".tar.gz")) - (modules '((guix build utils))) - (snippet - '(begin - ;; The Guile build system compiles *.scm; avoid - ;; compiling included lalr. - (delete-file "guix.scm") - (delete-file-recursively "tests") - (substitute* "system/base/lalr.scm" - (("system/base/lalr.upstream.scm") "lalr.upstream.scm= ")) - #t)) - (sha256 - (base32 - "090d8m0b165jf9381nhqpljc5zk22jd6bw03xnyf0na5snk9xp6v")))= )) - (build-system guile-build-system) - (native-inputs `(("bash" ,(bootstrap-executable "bash" (%current-syste= m))) - ("tar" ,(bootstrap-executable "tar" (%current-system)= )) - ("xz" ,(bootstrap-executable "xz" (%current-system))) - ("guile-source" ,(bootstrap-origin - (package-source guile-2.0))) - ;; We need the 2.0.9 lalr for %bootstrap-guile - ("lalr.upstream" - ,(origin - (method url-fetch) - (uri (string-append "http://git.savannah.gnu.org/= cgit/guile.git/plain/module/system/base/lalr.upstream.scm?h=3Dv2.0.9")) - (file-name "lalr.upstream.scm") - (sha256 - (base32 - "0h7gyjj8nr2qrgzwma146s7l22scp8bbcqzdy9wqf12bgy= hbw7d5")))))) - (inputs `(("guile" ,%bootstrap-guile+guild) - ("gash" ,gash-boot))) (arguments `(#:implicit-inputs? #f - #:guile ,%bootstrap-guile+guild - #:not-compiled-file-regexp "upstream\\.scm$" + #:tests? #f + #:guile ,%bootstrap-guile #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-guile-source - (lambda _ - (let ((guile-source (assoc-ref %build-inputs "guile-source")) - (bin (string-append (getcwd) "/zee-bin"))) - (mkdir-p bin) - (with-directory-excursion bin - (invoke "tar" "--strip-components=3D2" - - "-xvf" guile-source - (string-append "guile-" - ,(package-version guile-2.0) - "/meta/guild.in")) - (copy-file "guild.in" "guild") - (chmod "guild" #o555)) - #t))) - (add-before 'unpack 'set-path - (lambda _ - (let ((bash (assoc-ref %build-inputs "bash")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (bin (string-append (getcwd) "/zee-bin"))) - (mkdir-p bin) - (setenv "PATH" (string-append bin ":" (getenv "PATH"))) - (copy-file bash (string-append bin "/bash")) - (copy-file bash (string-append bin "/sh")) - (copy-file tar (string-append bin "/tar")) - (copy-file xz (string-append bin "/xz")) - #t))) - (add-before 'build 'set-env - (lambda _ - (let ((gash (assoc-ref %build-inputs "gash"))) - (setenv "LANG" "C") - (setenv "LC_ALL" "C") - (setenv "GUILE_LOAD_PATH" - (string-append (getcwd) - ":" (getcwd) "/system/base" - ":" gash "/share/guile/2.0")) - (setenv "GUILE_LOAD_COMPILED_PATH" - (string-append ".:" gash "/lib/guile/2.0/site-ccach= e/")) - (format (current-error-port) - "GUILE_LOAD_PATH=3D~s\n" (getenv "GUILE_LOAD_PATH")) - #t))) - (add-before 'build 'replace-lalr.upstream - (lambda _ - (let ((lalr.upstream (assoc-ref %build-inputs "lalr.upstream"= ))) - (copy-file lalr.upstream "system/base/lalr.upstream.scm") - #t))) - (add-after 'build 'build-scripts + (modify-phases ,(make-bootstrap-phases (version) "scripts" "gash") + (add-after 'unpack 'set-load-path + (lambda* (#:key inputs #:allow-other-keys) + (let ((gash (assoc-ref inputs "gash"))) + (add-to-load-path (string-append gash "/share/guile/site/" + (effective-version)))) + #t)) + (add-before 'configure 'pre-configure (lambda _ - (let* ((guile (assoc-ref %build-inputs "guile")) - (guile (string-append guile "/bin/guile")) - (gash (string-append guile "gash")) - (out (assoc-ref %outputs "out")) - (effective "2.0") - (guilemoduledir (string-append gash "/share/guile/site= /" effective "/")) - (guileobjectdir (string-append gash "/lib/guile/" effe= ctive "/site-ccache/")) - (gashmoduledir (string-append out "/share/guile/site/"= effective "/")) - (gashobjectdir (string-append out "/lib/guile/" effect= ive "/site-ccache/")) - (bin (string-append out "/bin"))) - (define (wrap name) - (copy-file "command.in" name) - (chmod name #o555) - (substitute* name - (("@GUILE@") guile) - (("@guilemoduledir@") guilemoduledir) - (("@guileobjectdir") guileobjectdir) - (("@gashmoduledir@") gashmoduledir) - (("@gashobjectdir") gashobjectdir) - (("@command@") name)) - (install-file name bin)) - (mkdir-p bin) - (with-directory-excursion "bin" - (for-each wrap '("awk" - "basename" - "cat" - "chmod" - "cmp" - "compress" - "cp" - "cut" - "diff" - "dirname" - "expr" - "false" - "find" - "grep" - "gzip" - "head" - "ln" - "ls" - "mkdir" - "mv" - "pwd" - "reboot" - "rm" - "rmdir" - "sed" - "sleep" - "sort" - "tar" - "test" - "touch" - "tr" - "true" - "uname" - "uniq" - "wc" - "which"))) - (with-directory-excursion bin - (copy-file "grep" "fgrep") - (copy-file "grep" "egrep") - (copy-file "test" "[")) - #t)))))))) + (format #t "Creating gash/commands/testb.scm~%") + (copy-file "gash/commands/test.scm" + "gash/commands/testb.scm") + (substitute* "gash/commands/testb.scm" + (("gash commands test") "gash commands testb") + (("apply test [(]cdr") "apply test/bracket (cdr")) + (for-each (lambda (script) + (let ((target (string-append "scripts/" + script ".in"))) + (format #t "Creating scripts/~a~%" target) + (copy-file "scripts/template.in" target) + (substitute* target + (("@UTILITY@") script)))) + '("awk" "basename" "cat" "chmod" "cmp" "command" + "compress" "cp" "cut" "diff" "dirname" "expr" + "false" "find" "grep" "head" "ln" "ls" "mkdir" + "mv" "printf" "pwd" "reboot" "rm" "rmdir" + "sed" "sleep" "sort" "tar" "test" "touch" "tr" + "true" "uname" "uniq" "wc" "which")) + (format #t "Creating scripts/[.in~%") + (copy-file "scripts/template.in" "scripts/[.in") + (substitute* "scripts/[.in" + (("@UTILITY@") "testb")) + #t)) + ;; XXX: The scripts should add Gash to their load paths and + ;; this phase should not exist. Although ultimately, Gash + ;; should depend on Gash-Utils, so that it can treat its + ;; commands as built-ins. + (add-after 'install 'copy-gash + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (moddir (string-append out "/share/guile/site/" + (effective-version))) + (godir (string-append out "/lib/guile/" + (effective-version) + "/site-ccache")) + (gash (assoc-ref inputs "gash")) + (gash-moddir (string-append gash "/share/guile/site/" + (effective-version))) + (gash-godir (string-append gash "/lib/guile/" + (effective-version) + "/site-ccache"))) + (copy-file (string-append gash-moddir "/gash/compat.scm") + (string-append moddir "/gash/compat.scm")) + (copy-recursively (string-append gash-moddir "/gash/compat") + (string-append moddir "/gash/compat")) + (copy-file (string-append gash-godir "/gash/compat.go") + (string-append godir "/gash/compat.go")) + (copy-recursively (string-append gash-godir "/gash/compat") + (string-append godir "/gash/compat")) + #t)))))) + (inputs `(("gash" ,gash-boot) + ("guile" ,%bootstrap-guile))) + (native-inputs `(("bootar" ,bootar))))) =20 (define (%boot-gash-inputs) `(("bash" , gash-boot) ; gnu-build-system wants "bash" ("coreutils" , gash-utils-boot) - ("guile" ,%bootstrap-guile) - ("guile+guild" ,%bootstrap-guile+guild))) + ("bootar" ,bootar) + ("guile" ,%bootstrap-guile))) =20 (define %bootstrap-mes-rewired (package @@ -542,8 +516,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\" (setenv "GUILE_LOAD_PATH" (string-append mes "/share/mes/module" - ":" dir "/nyacc-0.99.0/module" - ":" (getenv "GUILE_LOAD_PATH"))) + ":" dir "/nyacc-0.99.0/module")) (invoke "gash" "configure.sh" (string-append "--prefix=3D" out) (string-append "--host=3Di686-linux-gnu"))))) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index ea61e7b2f8..718908e5ce 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -830,14 +830,14 @@ as part of the Guix bootstrap process.") (define-public gash-utils (package (name "gash-utils") - (version "0.0.211-789c3") + (version "0.1.0-preview") (source (origin (method url-fetch) - (uri (string-append "http://lilypond.org/janneke/guix/201911= 23/" - "/gash-core-utils-" version ".tar.gz")) + (uri (string-append "https://files.ngyro.com/tmp/gash-utils-" + version ".tar.gz")) (sha256 (base32 - "1ycf0ivyn9q3lc9hwq8vxg6wkwpsykvh48a5lrzsmganh0ma8wrr")))) + "1d6rmhhsgqbwjbi0fp383ac6gnxqd8yaq43mbc63xalni13g3mbc")))) (build-system gnu-build-system) (native-inputs `(("autoconf" ,autoconf) --=20 2.24.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-Remove-bootstrap-guile-guild.patch >From b363e2c3dfcf2906b181c0120e35f6b701455122 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Mon, 3 Feb 2020 11:46:25 -0500 Subject: [PATCH 3/3] Remove %bootstrap-guile+guild. * gnu/packages/commencement.scm (%bootstrap-guile+guild): Remove variable. --- gnu/packages/commencement.scm | 58 ----------------------------------- 1 file changed, 58 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 914b3f2a8d..b797af1585 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -86,64 +86,6 @@ ;;; ;;; Code: -(define %bootstrap-guile+guild - ;; This package combines %bootstrap-guile with guild, which is not included - ;; in %bootstrap-guile. Guild is needed to build gash-boot and - ;; gash-utils-boot because it is dependency of the Guile build system. - (package - (name "guile-bootstrap+guild") - (version "2.0") - (source (bootstrap-origin (package-source guile-2.0))) - (native-inputs `(("bash" ,(bootstrap-executable "bash" (%current-system))) - ("tar" ,(bootstrap-executable "tar" (%current-system))) - ("xz" ,(bootstrap-executable "xz" (%current-system))) - ("guile" ,%bootstrap-guile))) - (build-system trivial-build-system) - (arguments - `(#:guile ,%bootstrap-guile - #:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils)) - (let ((guile-source (assoc-ref %build-inputs "source")) - (bin (string-append (getcwd) "/bin")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz"))) - (mkdir-p bin) - (setenv "PATH" bin) - (with-directory-excursion bin - (copy-file tar "tar") - (copy-file xz "xz") - (setenv "PATH" bin)) - (let* ((out (assoc-ref %outputs "out")) - (out-bin (string-append out "/bin")) - (guile (assoc-ref %build-inputs "guile")) - (bash (assoc-ref %build-inputs "bash"))) - (mkdir-p out-bin) - (with-directory-excursion out-bin - (symlink (string-append guile "/bin/guile") - "guile") - (invoke "tar" "--strip-components=2" - "-xvf" guile-source - (string-append "guile-" - ,(package-version guile-2.0) - "/meta/guild.in")) - (copy-file "guild.in" "guild") - (substitute* "guild" - (("#!/bin/sh") (string-append "#! " bash)) - (("@installed_guile@") (string-append out-bin "/guile"))) - (chmod "guild" #o555))))))) - (synopsis "Bootstrap Guile plus Guild") - (description "Bootstrap Guile with added Guild") - (home-page #f) - (license (package-license guile-2.0)) - (native-search-paths - (list (search-path-specification - (variable "GUILE_LOAD_PATH") - (files '("share/guile/site/2.0"))) - (search-path-specification - (variable "GUILE_LOAD_COMPILED_PATH") - (files '("lib/guile/2.0/site-ccache"))))))) - (define (make-bootstrap-phases version scripts modules) "Create a form that modifies the standard GNU build phases so that they build simple Guile programs using only the bootstrap Guile. The -- 2.24.1 --=-=-=--