2013-01-05 18:47:50 -05:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2020-05-19 09:55:08 -04:00
|
|
|
|
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
2019-08-15 15:39:57 -04:00
|
|
|
|
;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <mhw@netris.org>
|
2020-01-31 09:28:23 -05:00
|
|
|
|
;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
|
|
|
|
|
;;; Copyright © 2018, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2019-08-14 13:46:53 -04:00
|
|
|
|
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
|
2019-05-21 01:00:30 -04:00
|
|
|
|
;;; Copyright © 2019 Léo Le Bouter <lle-bout@zaclys.net>
|
2020-08-02 16:17:11 -04:00
|
|
|
|
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
2021-01-10 19:58:57 -05:00
|
|
|
|
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
;;;
|
2013-01-05 18:47:50 -05:00
|
|
|
|
;;; This file is part of GNU Guix.
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
;;;
|
2013-01-05 18:47:50 -05:00
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
|
;;; your option) any later version.
|
|
|
|
|
;;;
|
2013-01-05 18:47:50 -05:00
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
|
;;;
|
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
2013-01-05 18:47:50 -05:00
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
2013-01-17 19:06:24 -05:00
|
|
|
|
(define-module (gnu packages bootstrap)
|
distro: Use (guix licenses) instead of strings.
* distro/packages/acl.scm, distro/packages/attr.scm,
distro/packages/autotools.scm, distro/packages/base.scm,
distro/packages/bash.scm, distro/packages/bdw-gc.scm,
distro/packages/bison.scm, distro/packages/bootstrap.scm,
distro/packages/compression.scm, distro/packages/cpio.scm,
distro/packages/ddrescue.scm, distro/packages/ed.scm,
distro/packages/flex.scm, distro/packages/gawk.scm,
distro/packages/gdbm.scm, distro/packages/gettext.scm,
distro/packages/gnupg.scm, distro/packages/gnutls.scm,
distro/packages/gperf.scm, distro/packages/guile.scm,
distro/packages/help2man.scm, distro/packages/less.scm,
distro/packages/libffi.scm, distro/packages/libsigsegv.scm,
distro/packages/libunistring.scm, distro/packages/linux.scm,
distro/packages/lout.scm, distro/packages/lsh.scm,
distro/packages/m4.scm, distro/packages/multiprecision.scm,
distro/packages/nano.scm, distro/packages/ncurses.scm,
distro/packages/nettle.scm, distro/packages/perl.scm,
distro/packages/pkg-config.scm, distro/packages/pth.scm,
distro/packages/readline.scm, distro/packages/recutils.scm,
distro/packages/shishi.scm, distro/packages/system.scm,
distro/packages/texinfo.scm, distro/packages/time.scm,
distro/packages/wget.scm, distro/packages/which.scm,
distro/packages/zile.scm: Use (guix licenses).
2012-12-14 10:14:04 -05:00
|
|
|
|
#:use-module (guix licenses)
|
2013-01-17 19:06:47 -05:00
|
|
|
|
#:use-module (gnu packages)
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
#:use-module (guix packages)
|
2012-11-12 17:10:26 -05:00
|
|
|
|
#:use-module (guix download)
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
#:use-module (guix build-system)
|
|
|
|
|
#:use-module (guix build-system gnu)
|
|
|
|
|
#:use-module (guix build-system trivial)
|
2017-07-27 09:00:58 -04:00
|
|
|
|
#:use-module ((guix store)
|
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
2015-03-28 14:26:39 -04:00
|
|
|
|
#:select (%store-monad interned-file text-file store-lift))
|
2017-07-27 09:00:58 -04:00
|
|
|
|
#:use-module ((guix derivations)
|
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
2015-03-28 14:26:39 -04:00
|
|
|
|
#:select (raw-derivation derivation-input derivation->output-path))
|
|
|
|
|
#:use-module (guix utils)
|
|
|
|
|
#:use-module ((guix build utils) #:select (elf-file?))
|
2019-10-27 17:42:59 -04:00
|
|
|
|
#:use-module ((guix gexp) #:select (lower-object))
|
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
2015-03-28 14:26:39 -04:00
|
|
|
|
#:use-module (guix monads)
|
Add (guix memoization).
* guix/combinators.scm (memoize): Remove.
* guix/memoization.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages.scm, gnu/packages/bootstrap.scm,
guix/build-system/gnu.scm, guix/build-system/python.scm,
guix/derivations.scm, guix/gnu-maintenance.scm,
guix/import/cran.scm, guix/import/elpa.scm,
guix/modules.scm, guix/scripts/build.scm,
guix/scripts/graph.scm, guix/scripts/lint.scm,
guix/store.scm, guix/utils.scm: Adjust imports accordingly.
2017-01-28 10:33:57 -05:00
|
|
|
|
#:use-module (guix memoization)
|
2019-06-14 09:10:45 -04:00
|
|
|
|
#:use-module (guix i18n)
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
#:use-module (srfi srfi-1)
|
|
|
|
|
#:use-module (srfi srfi-26)
|
2019-06-14 09:10:45 -04:00
|
|
|
|
#:use-module (srfi srfi-34)
|
|
|
|
|
#:use-module (srfi srfi-35)
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
#:use-module (ice-9 match)
|
|
|
|
|
#:export (bootstrap-origin
|
|
|
|
|
package-with-bootstrap-guile
|
|
|
|
|
glibc-dynamic-linker
|
|
|
|
|
|
2019-06-14 15:35:08 -04:00
|
|
|
|
bootstrap-executable
|
2017-07-27 10:41:42 -04:00
|
|
|
|
bootstrap-guile-origin
|
|
|
|
|
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
%bootstrap-guile
|
|
|
|
|
%bootstrap-coreutils&co
|
2018-09-09 06:34:21 -04:00
|
|
|
|
%bootstrap-linux-libre-headers
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
%bootstrap-binutils
|
|
|
|
|
%bootstrap-gcc
|
|
|
|
|
%bootstrap-glibc
|
2018-09-09 06:34:21 -04:00
|
|
|
|
%bootstrap-inputs
|
2018-11-16 15:30:00 -05:00
|
|
|
|
%bootstrap-mescc-tools
|
2019-06-14 15:26:22 -04:00
|
|
|
|
%bootstrap-mes
|
|
|
|
|
|
|
|
|
|
%bootstrap-inputs-for-tests))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
;;;
|
|
|
|
|
;;; Pre-built packages that are used to bootstrap the
|
|
|
|
|
;;; distribution--i.e., to build all the core packages from scratch.
|
|
|
|
|
;;;
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
|
2019-06-14 09:10:45 -04:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; The bootstrap executables: 'bash', 'mkdir', 'tar', 'xz'. They allow us to
|
|
|
|
|
;;; extract the very first tarball.
|
|
|
|
|
;;;
|
|
|
|
|
|
|
|
|
|
(define %bootstrap-executables
|
|
|
|
|
;; List of bootstrap executables and their recursive hashes (as per 'guix
|
|
|
|
|
;; hash -r'), taking their executable bit into account.
|
|
|
|
|
`(("aarch64-linux"
|
|
|
|
|
("bash"
|
|
|
|
|
,(base32 "13aqhqb8nydlwq1ah9974q0iadx1pb95v13wzzyf7vgv6nasrwzr"))
|
|
|
|
|
("mkdir"
|
|
|
|
|
,(base32 "1pxhdp7ldwavmm71xbh9wc197cb2nr66acjn26yjx3732cixh9ws"))
|
|
|
|
|
("tar"
|
|
|
|
|
,(base32 "1j51gv08sfg277yxj73xd564wjq3f8xwd6s9rbcg8v9gms47m4cx"))
|
|
|
|
|
("xz"
|
|
|
|
|
,(base32 "1d779rwsrasphg5g3r37qppcqy3p7ay1jb1y83w7x4i3qsc7zjy2")))
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
("bash"
|
|
|
|
|
,(base32 "0hwlw5lcyjzadprf5fm0cv4zb6jw667g9amnmhq0lbixasy7j72j"))
|
|
|
|
|
("mkdir"
|
|
|
|
|
,(base32 "12lfwh5p8pp06250wgi9mdvjv1jdfpd5xpmvfc0616aj0xqh09hp"))
|
|
|
|
|
("tar"
|
|
|
|
|
,(base32 "00sbmwl8qh6alxv9mw4hvj1j4yipwmw5mrw6qad8bi2pr7ya5386"))
|
|
|
|
|
("xz"
|
|
|
|
|
,(base32 "0hi47y6zh5zz137i59l5ibw92x6g54zn7ris1b1ym9rvavsasg7b")))
|
2019-06-14 09:10:45 -04:00
|
|
|
|
("armhf-linux"
|
|
|
|
|
("bash"
|
|
|
|
|
,(base32 "0s6f1s26g4dsrrkl39zblvwpxmbzi6n9mgqf6vxsqz42gik6bgyn"))
|
|
|
|
|
("mkdir"
|
|
|
|
|
,(base32 "1r5rcp35niyxfkrdf00y2ba8ifrq9bi76cr63lwjf2l655j1i5p7"))
|
|
|
|
|
("tar"
|
|
|
|
|
,(base32 "0dksx5im3fv8ximz7368bsax9f26nn47ds74298flm5lnvpv9xly"))
|
|
|
|
|
("xz"
|
|
|
|
|
,(base32 "1cqqavghjfr0iwxqf61lrssv27wfigysgq2rs4rm1gkmn04yn1k3")))
|
|
|
|
|
("i686-linux"
|
|
|
|
|
("bash"
|
|
|
|
|
,(base32 "0rjaxyzjdllfkf1abczvgaf3cdcc7mmahyvdbkjmjzhgz92pv23g"))
|
|
|
|
|
("mkdir"
|
|
|
|
|
,(base32 "133ybmfpkmsnysrzbngwvbysqnsmfi8is8zifs7i7n6n600h4s1w"))
|
|
|
|
|
("tar"
|
|
|
|
|
,(base32 "07830bx29ad5i0l1ykj0g0b1jayjdblf01sr3ww9wbnwdbzinqms"))
|
|
|
|
|
("xz"
|
|
|
|
|
,(base32 "0i9kxdi17bm5gxfi2xzm0y73p3ii0cqxli1sbljm6rh2fjgyn90k")))
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
("bash"
|
|
|
|
|
,(base32 "1as8649aqaibahhhrvkj10ci8shpi4hq5n7gnik8rhhy0dc1jarg"))
|
|
|
|
|
("mkdir"
|
|
|
|
|
,(base32 "1snqgpfrl00hfn82lm29jqylzjsfb9jd6ha74dp12phwb8fpbmb9"))
|
|
|
|
|
("tar"
|
|
|
|
|
,(base32 "0nq2c1zb3wv5bf7kd83sziaashydazrn7xgq6kijlk0zj2syzc2m"))
|
|
|
|
|
("xz"
|
|
|
|
|
,(base32 "033rhpk6zrpxpd6ffjyg5y2zwq9x9cnq0zljb7k8jlncbalsayq5")))
|
2019-06-14 09:10:45 -04:00
|
|
|
|
("mips64el-linux"
|
|
|
|
|
("bash"
|
|
|
|
|
,(base32 "1aw046dhda240k9pb9iaj5aqkm23gkvxa9j82n4k7fk87nbrixw6"))
|
|
|
|
|
("mkdir"
|
|
|
|
|
,(base32 "0c9j6qgyw84zxbry3ypifzll13gy8ax71w40kdk1h11jbgla3f5k"))
|
|
|
|
|
("tar"
|
|
|
|
|
,(base32 "06gmqdjq3rl8lr47b9fyx4ifnm5x56ymc8lyryp1ax1j2s4y5jb4"))
|
|
|
|
|
("xz"
|
2021-01-10 19:58:57 -05:00
|
|
|
|
,(base32 "09j1d69qr0hhhx4k4ih8wp00dfc9y4rp01hfg3vc15yxd0jxabh5")))
|
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
("bash"
|
|
|
|
|
,(base32 "1kiw7n6mkdy2x9in97646nb7aiayxr090ws1hbrlazah3fjqi6nj"))
|
|
|
|
|
("mkdir"
|
|
|
|
|
,(base32 "04dpvi231zcl40ig048vqqnyvmnkw1byrm1q1qqvs1f0g16yhrrk"))
|
|
|
|
|
("tar"
|
|
|
|
|
,(base32 "150c8948cz8r208g6qgn2dn4f4zs5kpgbpbg6bwag6yw42rapw2l"))
|
|
|
|
|
("xz"
|
|
|
|
|
,(base32 "0v5738idy9pqzcbrjdpxi5c6qs5m78zrpsydmrpx5cfcfzbkxzjh")))))
|
2019-06-14 09:10:45 -04:00
|
|
|
|
|
2020-03-16 03:17:16 -04:00
|
|
|
|
(define %bootstrap-executable-base-urls
|
|
|
|
|
;; This is where the bootstrap executables come from.
|
|
|
|
|
'("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
|
2021-01-10 19:58:57 -05:00
|
|
|
|
"https://alpha.gnu.org/gnu/guix/bootstrap/"
|
2020-02-09 02:15:36 -05:00
|
|
|
|
"http://flashner.co.il/guix/bootstrap/"
|
2020-03-16 03:17:16 -04:00
|
|
|
|
"http://lilypond.org/janneke/guix/"))
|
|
|
|
|
|
|
|
|
|
(define (bootstrap-executable-file-name system program)
|
|
|
|
|
"Return the FILE-NAME part of url where PROGRAM can be found for SYSTEM."
|
|
|
|
|
(match system
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux" (string-append system "/20210106/" program))
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu" (string-append system "/20200326/" program))
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux" (string-append system "/20200923/bin/" program))
|
2020-03-16 03:17:16 -04:00
|
|
|
|
(_ (string-append system "/" program
|
|
|
|
|
"?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))))
|
2019-06-14 09:10:45 -04:00
|
|
|
|
|
|
|
|
|
(define bootstrap-executable
|
|
|
|
|
(mlambda (program system)
|
|
|
|
|
"Return an origin for PROGRAM, a statically-linked bootstrap executable
|
|
|
|
|
built for SYSTEM."
|
|
|
|
|
(let ((system (if (string=? system "x86_64-linux")
|
|
|
|
|
"i686-linux"
|
|
|
|
|
system)))
|
|
|
|
|
(match (assoc-ref (assoc-ref %bootstrap-executables system)
|
|
|
|
|
program)
|
|
|
|
|
(#f
|
|
|
|
|
(raise (condition
|
|
|
|
|
(&message
|
|
|
|
|
(message
|
|
|
|
|
(format #f (G_ "could not find bootstrap binary '~a' \
|
|
|
|
|
for system '~a'")
|
|
|
|
|
program system))))))
|
2020-05-19 09:55:08 -04:00
|
|
|
|
((bv)
|
2019-06-14 09:10:45 -04:00
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch/executable)
|
2020-03-16 03:17:16 -04:00
|
|
|
|
(uri (map (cute string-append <>
|
|
|
|
|
(bootstrap-executable-file-name system program))
|
|
|
|
|
%bootstrap-executable-base-urls))
|
2019-06-14 09:10:45 -04:00
|
|
|
|
(file-name program)
|
2020-05-19 09:55:08 -04:00
|
|
|
|
(hash (content-hash bv sha256))))))))
|
2019-06-14 09:10:45 -04:00
|
|
|
|
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Helper procedures.
|
|
|
|
|
;;;
|
|
|
|
|
|
2019-11-03 11:59:28 -05:00
|
|
|
|
(define bootstrap-origin
|
|
|
|
|
(mlambdaq (source)
|
|
|
|
|
"Return a variant of SOURCE, an <origin> instance, whose method uses
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
%BOOTSTRAP-GUILE to do its job."
|
2019-11-03 11:59:28 -05:00
|
|
|
|
(define (boot fetch)
|
|
|
|
|
(lambda* (url hash-algo hash
|
|
|
|
|
#:optional name #:key system)
|
|
|
|
|
(fetch url hash-algo hash name
|
|
|
|
|
#:guile %bootstrap-guile
|
|
|
|
|
#:system system)))
|
|
|
|
|
|
|
|
|
|
(define %bootstrap-patch-inputs
|
|
|
|
|
;; Packages used when an <origin> has a non-empty 'patches' field.
|
|
|
|
|
`(("tar" ,%bootstrap-coreutils&co)
|
|
|
|
|
("xz" ,%bootstrap-coreutils&co)
|
|
|
|
|
("bzip2" ,%bootstrap-coreutils&co)
|
|
|
|
|
("gzip" ,%bootstrap-coreutils&co)
|
|
|
|
|
("patch" ,%bootstrap-coreutils&co)))
|
|
|
|
|
|
|
|
|
|
(let ((orig-method (origin-method source)))
|
|
|
|
|
(if (or (not (null? (origin-patches source)))
|
|
|
|
|
(origin-snippet source))
|
|
|
|
|
(origin (inherit source)
|
|
|
|
|
(method (if (eq? orig-method url-fetch)
|
|
|
|
|
(boot url-fetch)
|
|
|
|
|
orig-method))
|
|
|
|
|
(patch-guile %bootstrap-guile)
|
|
|
|
|
(patch-inputs %bootstrap-patch-inputs)
|
|
|
|
|
|
|
|
|
|
;; Patches can be origins as well, so process them.
|
|
|
|
|
(patches (map (match-lambda
|
|
|
|
|
((? origin? patch)
|
|
|
|
|
(bootstrap-origin patch))
|
|
|
|
|
(patch patch))
|
|
|
|
|
(origin-patches source))))
|
|
|
|
|
source))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
2014-12-31 03:38:26 -05:00
|
|
|
|
(define* (package-from-tarball name source program-to-test description
|
|
|
|
|
#:key snippet)
|
2013-10-15 17:42:58 -04:00
|
|
|
|
"Return a package that correspond to the extraction of SOURCE.
|
2018-09-09 06:32:07 -04:00
|
|
|
|
PROGRAM-TO-TEST is #f or a string: the program to run after extraction of
|
|
|
|
|
SOURCE to 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."
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(package
|
2013-10-15 17:42:58 -04:00
|
|
|
|
(name name)
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(version "0")
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:guile ,%bootstrap-guile
|
|
|
|
|
#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
2018-10-21 17:39:43 -04:00
|
|
|
|
(begin
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
|
2018-10-21 17:39:43 -04:00
|
|
|
|
(let ((out (assoc-ref %outputs "out"))
|
|
|
|
|
(tar (assoc-ref %build-inputs "tar"))
|
|
|
|
|
(xz (assoc-ref %build-inputs "xz"))
|
|
|
|
|
(tarball (assoc-ref %build-inputs "tarball")))
|
|
|
|
|
|
|
|
|
|
(mkdir out)
|
|
|
|
|
(copy-file tarball "binaries.tar.xz")
|
|
|
|
|
(invoke xz "-d" "binaries.tar.xz")
|
|
|
|
|
(let ((builddir (getcwd)))
|
|
|
|
|
(with-directory-excursion out
|
|
|
|
|
(invoke tar "xvf"
|
|
|
|
|
(string-append builddir "/binaries.tar"))
|
|
|
|
|
,@(if snippet (list snippet) '())
|
|
|
|
|
(or (not ,program-to-test)
|
|
|
|
|
(invoke (string-append "bin/" ,program-to-test)
|
|
|
|
|
"--version"))))))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(inputs
|
2019-06-14 09:10:45 -04:00
|
|
|
|
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
|
|
|
|
|
("xz" ,(bootstrap-executable "xz" (%current-system)))
|
2013-10-15 17:42:58 -04:00
|
|
|
|
("tarball" ,(bootstrap-origin (source (%current-system))))))
|
|
|
|
|
(source #f)
|
|
|
|
|
(synopsis description)
|
2016-04-27 04:08:00 -04:00
|
|
|
|
(description description)
|
2013-03-06 18:42:18 -05:00
|
|
|
|
(home-page #f)
|
2015-09-06 05:09:33 -04:00
|
|
|
|
(license gpl3+)))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
|
|
|
|
(define package-with-bootstrap-guile
|
2018-01-18 10:37:41 -05:00
|
|
|
|
(mlambdaq (p)
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
"Return a variant of P such that all its origins are fetched with
|
|
|
|
|
%BOOTSTRAP-GUILE."
|
|
|
|
|
(define rewritten-input
|
|
|
|
|
(match-lambda
|
2017-01-28 11:09:34 -05:00
|
|
|
|
((name (? origin? o))
|
|
|
|
|
`(,name ,(bootstrap-origin o)))
|
|
|
|
|
((name (? package? p) sub-drvs ...)
|
|
|
|
|
`(,name ,(package-with-bootstrap-guile p) ,@sub-drvs))
|
|
|
|
|
(x x)))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
|
|
|
|
(package (inherit p)
|
2017-01-28 11:09:34 -05:00
|
|
|
|
(source (match (package-source p)
|
|
|
|
|
((? origin? o) (bootstrap-origin o))
|
|
|
|
|
(s s)))
|
|
|
|
|
(inputs (map rewritten-input
|
|
|
|
|
(package-inputs p)))
|
|
|
|
|
(native-inputs (map rewritten-input
|
|
|
|
|
(package-native-inputs p)))
|
|
|
|
|
(propagated-inputs (map rewritten-input
|
|
|
|
|
(package-propagated-inputs p)))
|
|
|
|
|
(replacement (and=> (package-replacement p)
|
|
|
|
|
package-with-bootstrap-guile)))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
2013-06-26 10:27:51 -04:00
|
|
|
|
(define* (glibc-dynamic-linker
|
|
|
|
|
#:optional (system (or (and=> (%current-target-system)
|
|
|
|
|
gnu-triplet->nix-system)
|
|
|
|
|
(%current-system))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
"Return the name of Glibc's dynamic linker for SYSTEM."
|
2017-07-07 08:28:24 -04:00
|
|
|
|
;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
|
|
|
|
|
((string=? system "i686-linux") "/lib/ld-linux.so.2")
|
2015-01-07 15:55:23 -05:00
|
|
|
|
((string=? system "armhf-linux") "/lib/ld-linux-armhf.so.3")
|
2013-02-27 03:38:11 -05:00
|
|
|
|
((string=? system "mips64el-linux") "/lib/ld.so.1")
|
2015-09-04 07:22:17 -04:00
|
|
|
|
((string=? system "i586-gnu") "/lib/ld.so.1")
|
|
|
|
|
((string=? system "i686-gnu") "/lib/ld.so.1")
|
2016-04-15 09:33:55 -04:00
|
|
|
|
((string=? system "aarch64-linux") "/lib/ld-linux-aarch64.so.1")
|
2017-01-04 17:52:41 -05:00
|
|
|
|
((string=? system "powerpc-linux") "/lib/ld.so.1")
|
2019-05-21 01:00:30 -04:00
|
|
|
|
((string=? system "powerpc64-linux") "/lib/ld64.so.1")
|
2017-07-07 08:28:24 -04:00
|
|
|
|
((string=? system "powerpc64le-linux") "/lib/ld64.so.2")
|
2017-02-19 14:31:58 -05:00
|
|
|
|
((string=? system "alpha-linux") "/lib/ld-linux.so.2")
|
2018-02-16 09:50:42 -05:00
|
|
|
|
((string=? system "s390x-linux") "/lib/ld64.so.1")
|
2019-05-28 13:31:32 -04:00
|
|
|
|
((string=? system "riscv64-linux") "/lib/ld-linux-riscv64-lp64d.so.1")
|
2014-10-28 17:24:46 -04:00
|
|
|
|
|
|
|
|
|
;; XXX: This one is used bare-bones, without a libc, so add a case
|
|
|
|
|
;; here just so we can keep going.
|
2018-12-28 08:36:37 -05:00
|
|
|
|
((string=? system "arm-elf") "no-ld.so")
|
2016-09-17 13:00:54 -04:00
|
|
|
|
((string=? system "arm-eabi") "no-ld.so")
|
2014-10-28 17:24:46 -04:00
|
|
|
|
((string=? system "xtensa-elf") "no-ld.so")
|
2014-11-21 18:22:51 -05:00
|
|
|
|
((string=? system "avr") "no-ld.so")
|
2016-10-02 14:33:43 -04:00
|
|
|
|
((string=? system "propeller-elf") "no-ld.so")
|
2016-04-14 01:31:35 -04:00
|
|
|
|
((string=? system "i686-mingw") "no-ld.so")
|
2019-08-14 13:46:53 -04:00
|
|
|
|
((string=? system "x86_64-mingw") "no-ld.so")
|
2017-04-18 13:42:19 -04:00
|
|
|
|
((string=? system "vc4-elf") "no-ld.so")
|
2014-10-28 17:24:46 -04:00
|
|
|
|
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(else (error "dynamic linker name not known for this system"
|
|
|
|
|
system))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Bootstrap packages.
|
|
|
|
|
;;;
|
|
|
|
|
|
2017-07-27 09:00:58 -04:00
|
|
|
|
(define %bootstrap-base-urls
|
|
|
|
|
;; This is where the initial binaries come from.
|
2019-08-22 05:47:54 -04:00
|
|
|
|
'("https://ftp.gnu.org/gnu/guix/bootstrap"
|
|
|
|
|
"https://alpha.gnu.org/gnu/guix/bootstrap"
|
|
|
|
|
"http://ftp.gnu.org/gnu/guix/bootstrap"
|
2017-07-27 09:00:58 -04:00
|
|
|
|
"http://alpha.gnu.org/gnu/guix/bootstrap"
|
2017-07-27 09:17:48 -04:00
|
|
|
|
"ftp://alpha.gnu.org/gnu/guix/bootstrap"
|
2017-07-27 09:00:58 -04:00
|
|
|
|
"http://www.fdn.fr/~lcourtes/software/guix/packages"
|
2019-11-26 16:40:09 -05:00
|
|
|
|
"http://flashner.co.il/guix/bootstrap"
|
|
|
|
|
"http://lilypond.org/janneke/guix/"))
|
2017-07-27 09:00:58 -04:00
|
|
|
|
|
|
|
|
|
(define (bootstrap-guile-url-path system)
|
|
|
|
|
"Return the URI for FILE."
|
|
|
|
|
(string-append "/" system
|
|
|
|
|
(match system
|
|
|
|
|
("aarch64-linux"
|
|
|
|
|
"/20170217/guile-2.0.14.tar.xz")
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
"/20200923/guile-2.0.14.tar.xz")
|
2017-07-27 09:00:58 -04:00
|
|
|
|
("armhf-linux"
|
|
|
|
|
"/20150101/guile-2.0.11.tar.xz")
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
"/20200326/guile-static-stripped-2.0.14-i586-pc-gnu.tar.xz")
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
"/20210106/guile-static-stripped-2.0.14-powerpc64le-linux-gnu.tar.xz")
|
2017-07-27 09:00:58 -04:00
|
|
|
|
(_
|
|
|
|
|
"/20131110/guile-2.0.9.tar.xz"))))
|
|
|
|
|
|
|
|
|
|
(define (bootstrap-guile-hash system)
|
|
|
|
|
"Return the SHA256 hash of the Guile bootstrap tarball for SYSTEM."
|
|
|
|
|
(match system
|
|
|
|
|
("x86_64-linux"
|
|
|
|
|
(base32 "1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3"))
|
|
|
|
|
("i686-linux"
|
|
|
|
|
(base32 "0im800m30abgh7msh331pcbjvb4n02smz5cfzf1srv0kpx3csmxp"))
|
|
|
|
|
("mips64el-linux"
|
|
|
|
|
(base32 "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr"))
|
|
|
|
|
("armhf-linux"
|
|
|
|
|
(base32 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
(base32 "1rnyfz5q38jyvxddj617443bnnzql4vw0mxzqpj8wz48wx4bhbq0"))
|
2017-07-27 09:00:58 -04:00
|
|
|
|
("aarch64-linux"
|
2020-01-31 09:28:23 -05:00
|
|
|
|
(base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
|
|
|
|
|
("i586-gnu"
|
2020-02-09 02:15:36 -05:00
|
|
|
|
(base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))
|
|
|
|
|
("powerpc-linux"
|
|
|
|
|
(base32 "1by2p7s27fbyjzfkcw8h65h4kkqh7d23kv4sgg5jppjn2qx7swq4"))))
|
2017-07-27 09:00:58 -04:00
|
|
|
|
|
2017-07-27 10:41:42 -04:00
|
|
|
|
(define (bootstrap-guile-origin system)
|
|
|
|
|
"Return an <origin> object for the Guile tarball of SYSTEM."
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (map (cute string-append <> (bootstrap-guile-url-path system))
|
|
|
|
|
%bootstrap-base-urls))
|
|
|
|
|
(sha256 (bootstrap-guile-hash system))))
|
|
|
|
|
|
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
2015-03-28 14:26:39 -04:00
|
|
|
|
(define (download-bootstrap-guile system)
|
2017-07-27 09:00:58 -04:00
|
|
|
|
"Return a derivation that downloads the bootstrap Guile tarball for SYSTEM."
|
|
|
|
|
(let* ((path (bootstrap-guile-url-path system))
|
|
|
|
|
(base (basename path))
|
|
|
|
|
(urls (map (cut string-append <> path) %bootstrap-base-urls)))
|
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
2015-03-28 14:26:39 -04:00
|
|
|
|
(url-fetch urls 'sha256 (bootstrap-guile-hash system)
|
|
|
|
|
#:system system)))
|
2017-07-27 09:00:58 -04:00
|
|
|
|
|
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
2015-03-28 14:26:39 -04:00
|
|
|
|
(define* (raw-build name inputs
|
build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
[lower]: New field.
(<bag>): New record type.
(make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
bag-transitive-host-inputs, bag-transitive-target-inputs,
package->bag): New procedures.
(package-derivation): Use it; use the bag, apply its build procedure,
etc.
(package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
(%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
(trivial-build, trivial-cross-build): Remove 'source' parameter. Pass
INPUTS as is.
(trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
standard-search-paths, expand-inputs, standard-inputs): Remove.
(gnu-lower): New procedure.
(gnu-build): Remove 'source' and #:implicit-inputs? parameters.
Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get
the source from INPUT-DRVS.
(gnu-cross-build): Likewise.
(standard-cross-packages): Remove call to 'standard-packages'.
(standard-cross-inputs, standard-cross-search-paths): Remove.
(gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
(cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and
SEARCH-PATHS as is. Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
to "linux-headers".
(cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
Likewise. In 'propagated-inputs', change "cross-linux-headers" to
"linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
'build-system-builder'.
("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-03 12:06:16 -04:00
|
|
|
|
#:key outputs system search-paths
|
|
|
|
|
#:allow-other-keys)
|
|
|
|
|
(define (->store file)
|
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
2015-03-28 14:26:39 -04:00
|
|
|
|
(lower-object (bootstrap-executable file system)
|
|
|
|
|
system))
|
|
|
|
|
|
|
|
|
|
(define (make-guile-wrapper bash guile-real)
|
|
|
|
|
;; The following code, run by the bootstrap guile after it is unpacked,
|
|
|
|
|
;; creates a wrapper for itself to set its load path. This replaces the
|
|
|
|
|
;; previous non-portable method based on reading the /proc/self/exe
|
|
|
|
|
;; symlink.
|
|
|
|
|
'(begin
|
|
|
|
|
(use-modules (ice-9 match))
|
|
|
|
|
(match (command-line)
|
|
|
|
|
((_ out bash)
|
|
|
|
|
(let ((bin-dir (string-append out "/bin"))
|
|
|
|
|
(guile (string-append out "/bin/guile"))
|
|
|
|
|
(guile-real (string-append out "/bin/.guile-real"))
|
|
|
|
|
;; We must avoid using a bare dollar sign in this code,
|
|
|
|
|
;; because it would be interpreted by the shell.
|
|
|
|
|
(dollar (string (integer->char 36))))
|
|
|
|
|
(chmod bin-dir #o755)
|
|
|
|
|
(rename-file guile guile-real)
|
|
|
|
|
(call-with-output-file guile
|
|
|
|
|
(lambda (p)
|
|
|
|
|
(format p "\
|
2015-07-08 12:31:32 -04:00
|
|
|
|
#!~a
|
|
|
|
|
export GUILE_SYSTEM_PATH=~a/share/guile/2.0
|
|
|
|
|
export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/2.0/ccache
|
|
|
|
|
exec -a \"~a0\" ~a \"~a@\"\n"
|
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
2015-03-28 14:26:39 -04:00
|
|
|
|
bash out out dollar guile-real dollar)))
|
|
|
|
|
(chmod guile #o555)
|
|
|
|
|
(chmod bin-dir #o555))))))
|
|
|
|
|
|
|
|
|
|
(mlet* %store-monad ((tar (->store "tar"))
|
|
|
|
|
(xz (->store "xz"))
|
|
|
|
|
(mkdir (->store "mkdir"))
|
|
|
|
|
(bash (->store "bash"))
|
|
|
|
|
(guile (download-bootstrap-guile system))
|
|
|
|
|
(wrapper -> (make-guile-wrapper bash guile))
|
|
|
|
|
(builder
|
|
|
|
|
(text-file "build-bootstrap-guile.sh"
|
|
|
|
|
(format #f "
|
build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
[lower]: New field.
(<bag>): New record type.
(make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
bag-transitive-host-inputs, bag-transitive-target-inputs,
package->bag): New procedures.
(package-derivation): Use it; use the bag, apply its build procedure,
etc.
(package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
(%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
(trivial-build, trivial-cross-build): Remove 'source' parameter. Pass
INPUTS as is.
(trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
standard-search-paths, expand-inputs, standard-inputs): Remove.
(gnu-lower): New procedure.
(gnu-build): Remove 'source' and #:implicit-inputs? parameters.
Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get
the source from INPUT-DRVS.
(gnu-cross-build): Likewise.
(standard-cross-packages): Remove call to 'standard-packages'.
(standard-cross-inputs, standard-cross-search-paths): Remove.
(gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
(cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and
SEARCH-PATHS as is. Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
to "linux-headers".
(cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
Likewise. In 'propagated-inputs', change "cross-linux-headers" to
"linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
'build-system-builder'.
("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-03 12:06:16 -04:00
|
|
|
|
echo \"unpacking bootstrap Guile to '$out'...\"
|
|
|
|
|
~a $out
|
|
|
|
|
cd $out
|
2017-07-27 09:00:58 -04:00
|
|
|
|
~a -dc < $GUILE_TARBALL | ~a xv
|
build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
[lower]: New field.
(<bag>): New record type.
(make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
bag-transitive-host-inputs, bag-transitive-target-inputs,
package->bag): New procedures.
(package-derivation): Use it; use the bag, apply its build procedure,
etc.
(package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
(%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
(trivial-build, trivial-cross-build): Remove 'source' parameter. Pass
INPUTS as is.
(trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
standard-search-paths, expand-inputs, standard-inputs): Remove.
(gnu-lower): New procedure.
(gnu-build): Remove 'source' and #:implicit-inputs? parameters.
Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get
the source from INPUT-DRVS.
(gnu-cross-build): Likewise.
(standard-cross-packages): Remove call to 'standard-packages'.
(standard-cross-inputs, standard-cross-search-paths): Remove.
(gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
(cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and
SEARCH-PATHS as is. Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
to "linux-headers".
(cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
Likewise. In 'propagated-inputs', change "cross-linux-headers" to
"linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
'build-system-builder'.
("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-03 12:06:16 -04:00
|
|
|
|
|
2015-07-08 12:31:32 -04:00
|
|
|
|
# Use the bootstrap guile to create its own wrapper to set the load path.
|
|
|
|
|
GUILE_SYSTEM_PATH=$out/share/guile/2.0 \
|
|
|
|
|
GUILE_SYSTEM_COMPILED_PATH=$out/lib/guile/2.0/ccache \
|
|
|
|
|
$out/bin/guile -c ~s $out ~a
|
|
|
|
|
|
build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
[lower]: New field.
(<bag>): New record type.
(make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
bag-transitive-host-inputs, bag-transitive-target-inputs,
package->bag): New procedures.
(package-derivation): Use it; use the bag, apply its build procedure,
etc.
(package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
(%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
(trivial-build, trivial-cross-build): Remove 'source' parameter. Pass
INPUTS as is.
(trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
standard-search-paths, expand-inputs, standard-inputs): Remove.
(gnu-lower): New procedure.
(gnu-build): Remove 'source' and #:implicit-inputs? parameters.
Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get
the source from INPUT-DRVS.
(gnu-cross-build): Likewise.
(standard-cross-packages): Remove call to 'standard-packages'.
(standard-cross-inputs, standard-cross-search-paths): Remove.
(gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
(cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and
SEARCH-PATHS as is. Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
to "linux-headers".
(cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
Likewise. In 'propagated-inputs', change "cross-linux-headers" to
"linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
'build-system-builder'.
("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-03 12:06:16 -04:00
|
|
|
|
# Sanity check.
|
|
|
|
|
$out/bin/guile --version~%"
|
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
'cross-system' parameters; add #:native?. Rewrite to return
name/gexp-input tuples.
(bag->derivation): Adjust accordingly. Lower (bag-build bag).
(bag->cross-derivation): Ditto. Instead of #:native-drvs and
#:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
(%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
Switch to the use of gexps and 'gexp->derivation'.
(lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
'canonicalize-reference'.
(gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
and #:target-inputs instead of #:native-drvs and #:target-drvs.
(lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
(trivial-build): Remove 'store' parameter, change to gexps.
(trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
a normal return from the 'build' method.
("package->bag, sensitivity to %current-target-system"): Change 'build'
to match the new build system signature.
squash! build-system: Rewrite using gexps.
squash! build-system: Rewrite using gexps.
2015-03-28 14:26:39 -04:00
|
|
|
|
(derivation->output-path mkdir)
|
|
|
|
|
(derivation->output-path xz)
|
|
|
|
|
(derivation->output-path tar)
|
|
|
|
|
(object->string wrapper)
|
|
|
|
|
(derivation->output-path bash)))))
|
|
|
|
|
(raw-derivation name
|
|
|
|
|
(derivation->output-path bash) `(,builder)
|
|
|
|
|
#:system system
|
|
|
|
|
#:inputs (map derivation-input
|
|
|
|
|
(list bash mkdir tar xz guile))
|
|
|
|
|
#:sources (list builder)
|
|
|
|
|
#:env-vars `(("GUILE_TARBALL"
|
|
|
|
|
. ,(derivation->output-path guile))))))
|
build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
[lower]: New field.
(<bag>): New record type.
(make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
bag-transitive-host-inputs, bag-transitive-target-inputs,
package->bag): New procedures.
(package-derivation): Use it; use the bag, apply its build procedure,
etc.
(package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
(%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
(trivial-build, trivial-cross-build): Remove 'source' parameter. Pass
INPUTS as is.
(trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
standard-search-paths, expand-inputs, standard-inputs): Remove.
(gnu-lower): New procedure.
(gnu-build): Remove 'source' and #:implicit-inputs? parameters.
Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get
the source from INPUT-DRVS.
(gnu-cross-build): Likewise.
(standard-cross-packages): Remove call to 'standard-packages'.
(standard-cross-inputs, standard-cross-search-paths): Remove.
(gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
(cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and
SEARCH-PATHS as is. Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
to "linux-headers".
(cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
Likewise. In 'propagated-inputs', change "cross-linux-headers" to
"linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
'build-system-builder'.
("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-03 12:06:16 -04:00
|
|
|
|
|
|
|
|
|
(define* (make-raw-bag name
|
2014-10-05 10:32:25 -04:00
|
|
|
|
#:key source inputs native-inputs outputs
|
|
|
|
|
system target)
|
build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
[lower]: New field.
(<bag>): New record type.
(make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
bag-transitive-host-inputs, bag-transitive-target-inputs,
package->bag): New procedures.
(package-derivation): Use it; use the bag, apply its build procedure,
etc.
(package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
(%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
(trivial-build, trivial-cross-build): Remove 'source' parameter. Pass
INPUTS as is.
(trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
standard-search-paths, expand-inputs, standard-inputs): Remove.
(gnu-lower): New procedure.
(gnu-build): Remove 'source' and #:implicit-inputs? parameters.
Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get
the source from INPUT-DRVS.
(gnu-cross-build): Likewise.
(standard-cross-packages): Remove call to 'standard-packages'.
(standard-cross-inputs, standard-cross-search-paths): Remove.
(gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
(cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and
SEARCH-PATHS as is. Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
to "linux-headers".
(cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
Likewise. In 'propagated-inputs', change "cross-linux-headers" to
"linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
'build-system-builder'.
("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-03 12:06:16 -04:00
|
|
|
|
(bag
|
|
|
|
|
(name name)
|
2014-10-05 10:32:25 -04:00
|
|
|
|
(system system)
|
build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
[lower]: New field.
(<bag>): New record type.
(make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
bag-transitive-host-inputs, bag-transitive-target-inputs,
package->bag): New procedures.
(package-derivation): Use it; use the bag, apply its build procedure,
etc.
(package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
(%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
(trivial-build, trivial-cross-build): Remove 'source' parameter. Pass
INPUTS as is.
(trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
standard-search-paths, expand-inputs, standard-inputs): Remove.
(gnu-lower): New procedure.
(gnu-build): Remove 'source' and #:implicit-inputs? parameters.
Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get
the source from INPUT-DRVS.
(gnu-cross-build): Likewise.
(standard-cross-packages): Remove call to 'standard-packages'.
(standard-cross-inputs, standard-cross-search-paths): Remove.
(gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
(cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and
SEARCH-PATHS as is. Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
to "linux-headers".
(cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
Likewise. In 'propagated-inputs', change "cross-linux-headers" to
"linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
'build-system-builder'.
("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-03 12:06:16 -04:00
|
|
|
|
(build-inputs inputs)
|
|
|
|
|
(build raw-build)))
|
|
|
|
|
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(define %bootstrap-guile
|
|
|
|
|
;; The Guile used to run the build scripts of the initial derivations.
|
|
|
|
|
;; It is just unpacked from a tarball containing a pre-built binary.
|
|
|
|
|
;; This is typically built using %GUILE-BOOTSTRAP-TARBALL below.
|
|
|
|
|
;;
|
|
|
|
|
;; XXX: Would need libc's `libnss_files2.so' for proper `getaddrinfo'
|
|
|
|
|
;; support (for /etc/services).
|
|
|
|
|
(let ((raw (build-system
|
build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
[lower]: New field.
(<bag>): New record type.
(make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
bag-transitive-host-inputs, bag-transitive-target-inputs,
package->bag): New procedures.
(package-derivation): Use it; use the bag, apply its build procedure,
etc.
(package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
(%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
(trivial-build, trivial-cross-build): Remove 'source' parameter. Pass
INPUTS as is.
(trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
standard-search-paths, expand-inputs, standard-inputs): Remove.
(gnu-lower): New procedure.
(gnu-build): Remove 'source' and #:implicit-inputs? parameters.
Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get
the source from INPUT-DRVS.
(gnu-cross-build): Likewise.
(standard-cross-packages): Remove call to 'standard-packages'.
(standard-cross-inputs, standard-cross-search-paths): Remove.
(gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
(cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and
SEARCH-PATHS as is. Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
to "linux-headers".
(cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
Likewise. In 'propagated-inputs', change "cross-linux-headers" to
"linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
'build-system-builder'.
("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-03 12:06:16 -04:00
|
|
|
|
(name 'raw)
|
|
|
|
|
(description "Raw build system with direct store access")
|
|
|
|
|
(lower make-raw-bag))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(package
|
|
|
|
|
(name "guile-bootstrap")
|
|
|
|
|
(version "2.0")
|
|
|
|
|
(source #f)
|
|
|
|
|
(build-system raw)
|
|
|
|
|
(synopsis "Bootstrap Guile")
|
|
|
|
|
(description "Pre-built Guile for bootstrapping purposes.")
|
|
|
|
|
(home-page #f)
|
distro: Use (guix licenses) instead of strings.
* distro/packages/acl.scm, distro/packages/attr.scm,
distro/packages/autotools.scm, distro/packages/base.scm,
distro/packages/bash.scm, distro/packages/bdw-gc.scm,
distro/packages/bison.scm, distro/packages/bootstrap.scm,
distro/packages/compression.scm, distro/packages/cpio.scm,
distro/packages/ddrescue.scm, distro/packages/ed.scm,
distro/packages/flex.scm, distro/packages/gawk.scm,
distro/packages/gdbm.scm, distro/packages/gettext.scm,
distro/packages/gnupg.scm, distro/packages/gnutls.scm,
distro/packages/gperf.scm, distro/packages/guile.scm,
distro/packages/help2man.scm, distro/packages/less.scm,
distro/packages/libffi.scm, distro/packages/libsigsegv.scm,
distro/packages/libunistring.scm, distro/packages/linux.scm,
distro/packages/lout.scm, distro/packages/lsh.scm,
distro/packages/m4.scm, distro/packages/multiprecision.scm,
distro/packages/nano.scm, distro/packages/ncurses.scm,
distro/packages/nettle.scm, distro/packages/perl.scm,
distro/packages/pkg-config.scm, distro/packages/pth.scm,
distro/packages/readline.scm, distro/packages/recutils.scm,
distro/packages/shishi.scm, distro/packages/system.scm,
distro/packages/texinfo.scm, distro/packages/time.scm,
distro/packages/wget.scm, distro/packages/which.scm,
distro/packages/zile.scm: Use (guix licenses).
2012-12-14 10:14:04 -05:00
|
|
|
|
(license lgpl3+))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
|
|
|
|
(define %bootstrap-coreutils&co
|
|
|
|
|
(package-from-tarball "bootstrap-binaries"
|
|
|
|
|
(lambda (system)
|
|
|
|
|
(origin
|
Remove (guix http) and (guix ftp).
* guix/ftp.scm, guix/http.scm, guix/build/ftp.scm, guix/build/http.scm:
Remove.
* Makefile.am (MODULES): Likewise.
* tests/builders.scm, distro/packages/base.scm,
distro/packages/bash.scm, distro/packages/bdw-gc.scm,
distro/packages/compression.scm, distro/packages/gawk.scm,
distro/packages/gnupg.scm, distro/packages/gperf.scm,
distro/packages/guile.scm, distro/packages/libffi.scm,
distro/packages/libsigsegv.scm, distro/packages/libtool.scm,
distro/packages/libunistring.scm, distro/packages/lout.scm,
distro/packages/m4.scm, distro/packages/multiprecision.scm,
distro/packages/ncurses.scm, distro/packages/perl.scm,
distro/packages/pkg-config.scm, distro/packages/pth.scm,
distro/packages/readline.scm, distro/packages/recutils.scm: Use
`url-fetch' instead of `http-fetch' and `ftp-fetch'.
* distro/packages/bootstrap.scm: Likewise
(bootstrap-origin): Remove references to `http-fetch' and
`ftp-fetch'.
* guix.scm (%public-modules): Remove `http' and `ftp'; add `download'.
2012-11-12 18:22:44 -05:00
|
|
|
|
(method url-fetch)
|
2013-01-15 05:34:54 -05:00
|
|
|
|
(uri (map (cut string-append <> "/" system
|
2014-12-31 04:23:12 -05:00
|
|
|
|
(match system
|
|
|
|
|
("armhf-linux"
|
|
|
|
|
"/20150101/static-binaries.tar.xz")
|
2016-06-25 13:53:24 -04:00
|
|
|
|
("aarch64-linux"
|
|
|
|
|
"/20170217/static-binaries.tar.xz")
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
"/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
"/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
"/20200923/static-binaries.tar.xz")
|
2014-12-31 04:23:12 -05:00
|
|
|
|
(_
|
|
|
|
|
"/20131110/static-binaries.tar.xz")))
|
2013-01-15 05:34:54 -05:00
|
|
|
|
%bootstrap-base-urls))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(sha256
|
|
|
|
|
(match system
|
|
|
|
|
("x86_64-linux"
|
|
|
|
|
(base32
|
2013-11-14 18:10:10 -05:00
|
|
|
|
"0c533p9dhczzcsa1117gmfq3pc8w362g4mx84ik36srpr7cx2bg4"))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
("i686-linux"
|
|
|
|
|
(base32
|
2013-11-14 18:10:10 -05:00
|
|
|
|
"0s5b3jb315n13m1k8095l0a5hfrsz8g0fv1b6riyc5hnxqyphlak"))
|
2014-12-31 04:23:12 -05:00
|
|
|
|
("armhf-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"0gf0fn2kbpxkjixkmx5f4z6hv6qpmgixl69zgg74dbsfdfj8jdv5"))
|
2016-06-25 13:53:24 -04:00
|
|
|
|
("aarch64-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"18dfiq6c6xhsdpbidigw6480wh0vdgsxqq3xindq4lpdgqlccpfh"))
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"0afs2j9z2d1hjq42myz4iwjh0aqgzf59inifw87x6b6p1z9wv92v"))
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
(base32
|
|
|
|
|
"17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"0kspxy0yczan2vlih6aa9hailr2inz000fqa0gn5x9d1fxxa5y8m"))
|
2013-10-17 15:47:56 -04:00
|
|
|
|
("mips64el-linux"
|
|
|
|
|
(base32
|
2013-11-14 18:10:10 -05:00
|
|
|
|
"072y4wyfsj1bs80r6vbybbafy8ya4vfy7qj25dklwk97m6g71753"))))))
|
2014-12-31 03:41:50 -05:00
|
|
|
|
"fgrep" ; the program to test
|
|
|
|
|
"Bootstrap binaries of Coreutils, Awk, etc."
|
|
|
|
|
#:snippet
|
|
|
|
|
'(let ((path (list (string-append (getcwd) "/bin"))))
|
|
|
|
|
(chmod "bin" #o755)
|
|
|
|
|
(patch-shebang "bin/egrep" path)
|
|
|
|
|
(patch-shebang "bin/fgrep" path)
|
2016-11-13 04:48:23 -05:00
|
|
|
|
;; Starting with grep@2.25 'egrep' and 'fgrep' are shell files
|
|
|
|
|
;; that call 'grep'. If the bootstrap 'egrep' and 'fgrep'
|
|
|
|
|
;; are not binaries then patch them to execute 'grep' via its
|
|
|
|
|
;; absolute file name instead of searching for it in $PATH.
|
|
|
|
|
(if (not (elf-file? "bin/egrep"))
|
|
|
|
|
(substitute* '("bin/egrep" "bin/fgrep")
|
|
|
|
|
(("^exec grep") (string-append (getcwd) "/bin/grep"))))
|
2018-03-16 03:48:24 -04:00
|
|
|
|
(chmod "bin" #o555))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
2018-09-09 06:34:21 -04:00
|
|
|
|
(define-public %bootstrap-linux-libre-headers
|
|
|
|
|
(package-from-tarball
|
|
|
|
|
"linux-libre-headers-bootstrap"
|
|
|
|
|
(lambda (system)
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
2018-11-24 02:49:48 -05:00
|
|
|
|
(uri (map (cute string-append <>
|
2019-08-15 15:39:57 -04:00
|
|
|
|
"/i686-linux/20190815/"
|
2018-11-24 02:49:48 -05:00
|
|
|
|
"linux-libre-headers-stripped-4.14.67-i686-linux.tar.xz")
|
|
|
|
|
%bootstrap-base-urls))
|
2018-09-09 06:34:21 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2018-11-24 02:49:48 -05:00
|
|
|
|
"0sm2z9x4wk45bh6qfs94p0w1d6hsy6dqx9sw38qsqbvxwa1qzk8s"))))
|
2018-09-09 06:34:21 -04:00
|
|
|
|
#f ; no program to test
|
|
|
|
|
"Bootstrap linux-libre-headers"))
|
|
|
|
|
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(define %bootstrap-binutils
|
|
|
|
|
(package-from-tarball "binutils-bootstrap"
|
|
|
|
|
(lambda (system)
|
|
|
|
|
(origin
|
Remove (guix http) and (guix ftp).
* guix/ftp.scm, guix/http.scm, guix/build/ftp.scm, guix/build/http.scm:
Remove.
* Makefile.am (MODULES): Likewise.
* tests/builders.scm, distro/packages/base.scm,
distro/packages/bash.scm, distro/packages/bdw-gc.scm,
distro/packages/compression.scm, distro/packages/gawk.scm,
distro/packages/gnupg.scm, distro/packages/gperf.scm,
distro/packages/guile.scm, distro/packages/libffi.scm,
distro/packages/libsigsegv.scm, distro/packages/libtool.scm,
distro/packages/libunistring.scm, distro/packages/lout.scm,
distro/packages/m4.scm, distro/packages/multiprecision.scm,
distro/packages/ncurses.scm, distro/packages/perl.scm,
distro/packages/pkg-config.scm, distro/packages/pth.scm,
distro/packages/readline.scm, distro/packages/recutils.scm: Use
`url-fetch' instead of `http-fetch' and `ftp-fetch'.
* distro/packages/bootstrap.scm: Likewise
(bootstrap-origin): Remove references to `http-fetch' and
`ftp-fetch'.
* guix.scm (%public-modules): Remove `http' and `ftp'; add `download'.
2012-11-12 18:22:44 -05:00
|
|
|
|
(method url-fetch)
|
2013-01-15 05:34:54 -05:00
|
|
|
|
(uri (map (cut string-append <> "/" system
|
2014-12-31 04:23:12 -05:00
|
|
|
|
(match system
|
|
|
|
|
("armhf-linux"
|
|
|
|
|
"/20150101/binutils-2.25.tar.xz")
|
2016-06-25 13:53:24 -04:00
|
|
|
|
("aarch64-linux"
|
|
|
|
|
"/20170217/binutils-2.27.tar.xz")
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
"/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
"/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
"/20200923/binutils-2.35.1.tar.xz")
|
2014-12-31 04:23:12 -05:00
|
|
|
|
(_
|
|
|
|
|
"/20131110/binutils-2.23.2.tar.xz")))
|
2013-01-15 05:34:54 -05:00
|
|
|
|
%bootstrap-base-urls))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(sha256
|
|
|
|
|
(match system
|
|
|
|
|
("x86_64-linux"
|
|
|
|
|
(base32
|
2013-11-14 18:10:10 -05:00
|
|
|
|
"1j5yivz7zkjqfsfmxzrrrffwyayjqyfxgpi89df0w4qziqs2dg20"))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
("i686-linux"
|
|
|
|
|
(base32
|
2013-11-14 18:10:10 -05:00
|
|
|
|
"14jgwf9gscd7l2pnz610b1zia06dvcm2qyzvni31b8zpgmcai2v9"))
|
2014-12-31 04:23:12 -05:00
|
|
|
|
("armhf-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"1v7dj6bzn6m36f20gw31l99xaabq4xrhrx3gwqkhhig0mdlmr69q"))
|
2016-06-25 13:53:24 -04:00
|
|
|
|
("aarch64-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"111s7ilfiby033rczc71797xrmaa3qlv179wdvsaq132pd51xv3n"))
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"1klxy945c61134mzhqzz2gbk8w0n8jq7arwkrvz78d22ff2q0cwz"))
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
(base32
|
|
|
|
|
"11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"0asbg1c4avkrvh057mx0942xwddd136jni382zqsxzn79ls42yq8"))
|
2013-10-17 15:47:56 -04:00
|
|
|
|
("mips64el-linux"
|
|
|
|
|
(base32
|
2013-11-14 18:10:10 -05:00
|
|
|
|
"1x8kkhcxmfyzg1ddpz2pxs6fbdl6412r7x0nzbmi5n7mj8zw2gy7"))))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
"ld" ; the program to test
|
|
|
|
|
"Bootstrap binaries of the GNU Binutils"))
|
|
|
|
|
|
|
|
|
|
(define %bootstrap-glibc
|
|
|
|
|
;; The initial libc.
|
|
|
|
|
(package
|
|
|
|
|
(name "glibc-bootstrap")
|
|
|
|
|
(version "0")
|
|
|
|
|
(source #f)
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:guile ,%bootstrap-guile
|
|
|
|
|
#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
2018-10-21 17:39:43 -04:00
|
|
|
|
(begin
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
|
2018-10-21 17:39:43 -04:00
|
|
|
|
(let ((out (assoc-ref %outputs "out"))
|
|
|
|
|
(tar (assoc-ref %build-inputs "tar"))
|
|
|
|
|
(xz (assoc-ref %build-inputs "xz"))
|
|
|
|
|
(tarball (assoc-ref %build-inputs "tarball")))
|
|
|
|
|
|
|
|
|
|
(mkdir out)
|
|
|
|
|
(copy-file tarball "binaries.tar.xz")
|
|
|
|
|
(invoke xz "-d" "binaries.tar.xz")
|
|
|
|
|
(let ((builddir (getcwd)))
|
|
|
|
|
(with-directory-excursion out
|
|
|
|
|
(invoke tar "xvf"
|
|
|
|
|
(string-append builddir
|
|
|
|
|
"/binaries.tar"))
|
|
|
|
|
(chmod "lib" #o755)
|
|
|
|
|
|
|
|
|
|
;; Patch libc.so so it refers to the right path.
|
|
|
|
|
(substitute* "lib/libc.so"
|
|
|
|
|
(("/[^ ]+/lib/(libc|ld)" _ prefix)
|
|
|
|
|
(string-append out "/lib/" prefix)))
|
|
|
|
|
|
|
|
|
|
#t))))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(inputs
|
2019-06-14 09:10:45 -04:00
|
|
|
|
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
|
|
|
|
|
("xz" ,(bootstrap-executable "xz" (%current-system)))
|
2013-01-24 17:33:30 -05:00
|
|
|
|
("tarball" ,(bootstrap-origin
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (map (cut string-append <> "/" (%current-system)
|
2014-12-31 04:23:12 -05:00
|
|
|
|
(match (%current-system)
|
|
|
|
|
("armhf-linux"
|
|
|
|
|
"/20150101/glibc-2.20.tar.xz")
|
2016-06-25 13:53:24 -04:00
|
|
|
|
("aarch64-linux"
|
|
|
|
|
"/20170217/glibc-2.25.tar.xz")
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
"/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
"/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
"/20200923/glibc-2.32.tar.xz")
|
2014-12-31 04:23:12 -05:00
|
|
|
|
(_
|
|
|
|
|
"/20131110/glibc-2.18.tar.xz")))
|
2013-01-24 17:33:30 -05:00
|
|
|
|
%bootstrap-base-urls))
|
|
|
|
|
(sha256
|
|
|
|
|
(match (%current-system)
|
|
|
|
|
("x86_64-linux"
|
|
|
|
|
(base32
|
2013-11-14 18:10:10 -05:00
|
|
|
|
"0jlqrgavvnplj1b083s20jj9iddr4lzfvwybw5xrcis9spbfzk7v"))
|
2013-01-24 17:33:30 -05:00
|
|
|
|
("i686-linux"
|
|
|
|
|
(base32
|
2013-11-14 18:10:10 -05:00
|
|
|
|
"1hgrccw1zqdc7lvgivwa54d9l3zsim5pqm0dykxg0z522h6gr05w"))
|
2014-12-31 04:23:12 -05:00
|
|
|
|
("armhf-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"18cmgvpllqfpn6khsmivqib7ys8ymnq0hdzi3qp24prik0ykz8gn"))
|
2016-06-25 13:53:24 -04:00
|
|
|
|
("aarch64-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"07nx3x8598i2924rjnlrncg6rm61c9bmcczbbcpbx0fb742nvv5c"))
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"1a1df6z8gkaq09md3jy94lixnh20599p58p0s856p10xwjaqr1iz"))
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
(base32
|
|
|
|
|
"14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
|
2013-10-17 15:47:56 -04:00
|
|
|
|
("mips64el-linux"
|
|
|
|
|
(base32
|
2013-11-14 18:10:10 -05:00
|
|
|
|
"0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg")))))))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(synopsis "Bootstrap binaries and headers of the GNU C Library")
|
2016-04-27 04:08:00 -04:00
|
|
|
|
(description synopsis)
|
2013-03-06 18:42:18 -05:00
|
|
|
|
(home-page #f)
|
|
|
|
|
(license lgpl2.1+)))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
|
|
|
|
(define %bootstrap-gcc
|
|
|
|
|
;; The initial GCC. Uses binaries from a tarball typically built by
|
|
|
|
|
;; %GCC-BOOTSTRAP-TARBALL.
|
|
|
|
|
(package
|
|
|
|
|
(name "gcc-bootstrap")
|
|
|
|
|
(version "0")
|
|
|
|
|
(source #f)
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 17:21:59 -05:00
|
|
|
|
`(#:guile ,%bootstrap-guile
|
|
|
|
|
#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
2018-10-21 17:39:43 -04:00
|
|
|
|
(begin
|
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 17:21:59 -05:00
|
|
|
|
(use-modules (guix build utils)
|
|
|
|
|
(ice-9 popen))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
2018-10-21 17:39:43 -04:00
|
|
|
|
(let ((out (assoc-ref %outputs "out"))
|
|
|
|
|
(tar (assoc-ref %build-inputs "tar"))
|
|
|
|
|
(xz (assoc-ref %build-inputs "xz"))
|
|
|
|
|
(bash (assoc-ref %build-inputs "bash"))
|
|
|
|
|
(libc (assoc-ref %build-inputs "libc"))
|
|
|
|
|
(tarball (assoc-ref %build-inputs "tarball")))
|
|
|
|
|
|
|
|
|
|
(mkdir out)
|
|
|
|
|
(copy-file tarball "binaries.tar.xz")
|
|
|
|
|
(invoke xz "-d" "binaries.tar.xz")
|
|
|
|
|
(let ((builddir (getcwd))
|
|
|
|
|
(bindir (string-append out "/bin")))
|
|
|
|
|
(with-directory-excursion out
|
|
|
|
|
(invoke tar "xvf"
|
|
|
|
|
(string-append builddir "/binaries.tar")))
|
|
|
|
|
|
|
|
|
|
(with-directory-excursion bindir
|
|
|
|
|
(chmod "." #o755)
|
|
|
|
|
(rename-file "gcc" ".gcc-wrapped")
|
|
|
|
|
(call-with-output-file "gcc"
|
|
|
|
|
(lambda (p)
|
|
|
|
|
(format p "#!~a
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
exec ~a/bin/.gcc-wrapped -B~a/lib \
|
|
|
|
|
-Wl,-rpath -Wl,~a/lib \
|
|
|
|
|
-Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
2018-10-21 17:39:43 -04:00
|
|
|
|
bash
|
|
|
|
|
out libc libc libc
|
|
|
|
|
,(glibc-dynamic-linker))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
2018-10-21 17:39:43 -04:00
|
|
|
|
(chmod "gcc" #o555)
|
|
|
|
|
#t))))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(inputs
|
2019-06-14 09:10:45 -04:00
|
|
|
|
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
|
|
|
|
|
("xz" ,(bootstrap-executable "xz" (%current-system)))
|
|
|
|
|
("bash" ,(bootstrap-executable "bash" (%current-system)))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
("libc" ,%bootstrap-glibc)
|
2013-01-24 17:33:30 -05:00
|
|
|
|
("tarball" ,(bootstrap-origin
|
|
|
|
|
(origin
|
2018-10-21 17:39:43 -04:00
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (map (cut string-append <> "/" (%current-system)
|
|
|
|
|
(match (%current-system)
|
|
|
|
|
("armhf-linux"
|
|
|
|
|
"/20150101/gcc-4.8.4.tar.xz")
|
|
|
|
|
("aarch64-linux"
|
|
|
|
|
"/20170217/gcc-5.4.0.tar.xz")
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
"/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
"/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
"/20200923/gcc-5.5.0.tar.xz")
|
2018-10-21 17:39:43 -04:00
|
|
|
|
(_
|
|
|
|
|
"/20131110/gcc-4.8.2.tar.xz")))
|
|
|
|
|
%bootstrap-base-urls))
|
|
|
|
|
(sha256
|
|
|
|
|
(match (%current-system)
|
|
|
|
|
("x86_64-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"17ga4m6195n4fnbzdkmik834znkhs53nkypp6557pl1ps7dgqbls"))
|
|
|
|
|
("i686-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"150c1arrf2k8vfy6dpxh59vcgs4p1bgiz2av5m19dynpks7rjnyw"))
|
|
|
|
|
("armhf-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"0ghz825yzp43fxw53kd6afm8nkz16f7dxi9xi40bfwc8x3nbbr8v"))
|
|
|
|
|
("aarch64-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"1ar3vdzyqbfm0z36kmvazvfswxhcihlacl2dzdjgiq25cqnq9ih1"))
|
2021-01-10 19:58:57 -05:00
|
|
|
|
("powerpc64le-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"151kjsai25vz2s667bgzpisx8f281fpl3n9pxz2yrp9jlnadz3m1"))
|
2020-01-31 09:28:23 -05:00
|
|
|
|
("i586-gnu"
|
|
|
|
|
(base32
|
|
|
|
|
"1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
|
2020-02-09 02:15:36 -05:00
|
|
|
|
("powerpc-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"1p7df3yixhm87dw5sccc6yn1i9db1r9hnmsg87wq5xi4rfmirq7w"))
|
2018-10-21 17:39:43 -04:00
|
|
|
|
("mips64el-linux"
|
|
|
|
|
(base32
|
|
|
|
|
"1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks")))))))))
|
2013-03-30 17:56:38 -04:00
|
|
|
|
(native-search-paths
|
|
|
|
|
(list (search-path-specification
|
2020-08-02 16:17:11 -04:00
|
|
|
|
(variable "C_INCLUDE_PATH")
|
packages: Add 'file-type' field to 'search-path-specification'.
Fixes <http://bugs.gnu.org/18033>.
* guix/packages.scm (<search-path-specification>): Rename 'directories'
field to 'files'. Add 'file-type'.
(search-path-specification->sexp): Honor 'file-type'.
* gnu/packages/autotools.scm, gnu/packages/bootstrap.scm,
gnu/packages/cross-base.scm, gnu/packages/games.scm,
gnu/packages/gcc.scm, gnu/packages/glib.scm,
gnu/packages/guile.scm, gnu/packages/man.scm,
gnu/packages/perl.scm, gnu/packages/pkg-config.scm,
gnu/packages/python.scm, gnu/packages/ruby.scm,
gnu/packages/xfce.scm: Change 'directories' to 'files'.
* tests/packages.scm ("search paths"): Change 'directories' field to
'files'.
* guix/scripts/environment.scm (for-each-search-path): Likewise.
2014-12-27 17:22:08 -05:00
|
|
|
|
(files '("include")))
|
2020-08-02 16:17:11 -04:00
|
|
|
|
(search-path-specification
|
|
|
|
|
(variable "CPLUS_INCLUDE_PATH")
|
|
|
|
|
(files '("include/c++" "include")))
|
2013-03-30 17:56:38 -04:00
|
|
|
|
(search-path-specification
|
|
|
|
|
(variable "LIBRARY_PATH")
|
packages: Add 'file-type' field to 'search-path-specification'.
Fixes <http://bugs.gnu.org/18033>.
* guix/packages.scm (<search-path-specification>): Rename 'directories'
field to 'files'. Add 'file-type'.
(search-path-specification->sexp): Honor 'file-type'.
* gnu/packages/autotools.scm, gnu/packages/bootstrap.scm,
gnu/packages/cross-base.scm, gnu/packages/games.scm,
gnu/packages/gcc.scm, gnu/packages/glib.scm,
gnu/packages/guile.scm, gnu/packages/man.scm,
gnu/packages/perl.scm, gnu/packages/pkg-config.scm,
gnu/packages/python.scm, gnu/packages/ruby.scm,
gnu/packages/xfce.scm: Change 'directories' to 'files'.
* tests/packages.scm ("search paths"): Change 'directories' field to
'files'.
* guix/scripts/environment.scm (for-each-search-path): Likewise.
2014-12-27 17:22:08 -05:00
|
|
|
|
(files '("lib" "lib64")))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
(synopsis "Bootstrap binaries of the GNU Compiler Collection")
|
2016-04-27 04:08:00 -04:00
|
|
|
|
(description synopsis)
|
2013-03-06 18:42:18 -05:00
|
|
|
|
(home-page #f)
|
|
|
|
|
(license gpl3+)))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
2018-11-16 15:30:00 -05:00
|
|
|
|
(define %bootstrap-mescc-tools
|
|
|
|
|
;; The initial MesCC tools. Uses binaries from a tarball typically built by
|
|
|
|
|
;; %MESCC-TOOLS-BOOTSTRAP-TARBALL.
|
|
|
|
|
(package
|
|
|
|
|
(name "bootstrap-mescc-tools")
|
|
|
|
|
(version "0.5.2")
|
|
|
|
|
(source #f)
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:guile ,%bootstrap-guile
|
|
|
|
|
#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils)
|
|
|
|
|
(ice-9 popen))
|
|
|
|
|
(let ((out (assoc-ref %outputs "out"))
|
|
|
|
|
(tar (assoc-ref %build-inputs "tar"))
|
|
|
|
|
(xz (assoc-ref %build-inputs "xz"))
|
|
|
|
|
(tarball (assoc-ref %build-inputs "tarball")))
|
|
|
|
|
|
|
|
|
|
(mkdir out)
|
|
|
|
|
(copy-file tarball "binaries.tar.xz")
|
|
|
|
|
(invoke xz "-d" "binaries.tar.xz")
|
|
|
|
|
(let ((builddir (getcwd))
|
|
|
|
|
(bindir (string-append out "/bin")))
|
|
|
|
|
(with-directory-excursion out
|
|
|
|
|
(invoke tar "xvf"
|
|
|
|
|
(string-append builddir "/binaries.tar"))))))))
|
|
|
|
|
(inputs
|
2019-06-14 09:10:45 -04:00
|
|
|
|
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
|
|
|
|
|
("xz" ,(bootstrap-executable "xz" (%current-system)))
|
2018-11-24 02:49:48 -05:00
|
|
|
|
("tarball"
|
|
|
|
|
,(bootstrap-origin
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (map
|
|
|
|
|
(cute string-append <>
|
2019-08-15 15:39:57 -04:00
|
|
|
|
"/i686-linux/20190815/"
|
|
|
|
|
"mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz")
|
2018-11-24 02:49:48 -05:00
|
|
|
|
%bootstrap-base-urls))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-08-15 15:39:57 -04:00
|
|
|
|
"0c3kklgghzh4q2dbpl6asb74cimp7hp6jscdwqwmzxbapgcl6582")))))))
|
2018-11-16 15:30:00 -05:00
|
|
|
|
(synopsis "Bootstrap binaries of MesCC Tools")
|
|
|
|
|
(description synopsis)
|
|
|
|
|
(home-page #f)
|
2018-12-24 20:16:25 -05:00
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
2018-11-16 15:30:00 -05:00
|
|
|
|
(license gpl3+)))
|
|
|
|
|
|
2018-10-20 03:02:39 -04:00
|
|
|
|
(define %bootstrap-mes
|
|
|
|
|
;; The initial Mes. Uses binaries from a tarball typically built by
|
|
|
|
|
;; %MES-BOOTSTRAP-TARBALL.
|
|
|
|
|
(package
|
|
|
|
|
(name "bootstrap-mes")
|
|
|
|
|
(version "0")
|
|
|
|
|
(source #f)
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:guile ,%bootstrap-guile
|
|
|
|
|
#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils)
|
|
|
|
|
(ice-9 popen))
|
|
|
|
|
(let ((out (assoc-ref %outputs "out"))
|
|
|
|
|
(tar (assoc-ref %build-inputs "tar"))
|
|
|
|
|
(xz (assoc-ref %build-inputs "xz"))
|
|
|
|
|
(tarball (assoc-ref %build-inputs "tarball")))
|
|
|
|
|
|
|
|
|
|
(mkdir out)
|
|
|
|
|
(copy-file tarball "binaries.tar.xz")
|
|
|
|
|
(invoke xz "-d" "binaries.tar.xz")
|
|
|
|
|
(let ((builddir (getcwd))
|
|
|
|
|
(bindir (string-append out "/bin")))
|
|
|
|
|
(with-directory-excursion out
|
|
|
|
|
(invoke tar "xvf"
|
|
|
|
|
(string-append builddir "/binaries.tar"))))))))
|
|
|
|
|
(inputs
|
2019-06-14 09:10:45 -04:00
|
|
|
|
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
|
|
|
|
|
("xz" ,(bootstrap-executable "xz" (%current-system)))
|
2018-11-24 02:49:48 -05:00
|
|
|
|
("tarball"
|
|
|
|
|
,(bootstrap-origin
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
2018-12-15 03:25:39 -05:00
|
|
|
|
(uri (map
|
|
|
|
|
(cute string-append <>
|
2019-08-15 15:39:57 -04:00
|
|
|
|
"/i686-linux/20190815/"
|
2018-12-15 03:25:39 -05:00
|
|
|
|
"mes-minimal-stripped-0.19-i686-linux.tar.xz")
|
|
|
|
|
%bootstrap-base-urls))
|
2018-11-24 02:49:48 -05:00
|
|
|
|
(sha256
|
2018-12-24 20:16:25 -05:00
|
|
|
|
(base32
|
2019-08-15 15:39:57 -04:00
|
|
|
|
"1q4xjpx6nbn44kxnilpgl12bhpmwy2bblzwszc2ci7xkf400jcpv")))))))
|
2018-12-24 20:16:25 -05:00
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
2018-10-20 03:02:39 -04:00
|
|
|
|
(synopsis "Bootstrap binaries of Mes")
|
|
|
|
|
(description synopsis)
|
|
|
|
|
(home-page #f)
|
|
|
|
|
(license gpl3+)))
|
|
|
|
|
|
2018-09-09 05:54:27 -04:00
|
|
|
|
(define (%bootstrap-inputs)
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
;; The initial, pre-built inputs. From now on, we can start building our
|
|
|
|
|
;; own packages.
|
2019-11-22 17:05:15 -05:00
|
|
|
|
(match (%current-system)
|
|
|
|
|
((or "i686-linux" "x86_64-linux")
|
|
|
|
|
`(("linux-libre-headers" ,%bootstrap-linux-libre-headers)
|
|
|
|
|
("bootstrap-mescc-tools" ,%bootstrap-mescc-tools)
|
|
|
|
|
("mes" ,%bootstrap-mes)))
|
|
|
|
|
(_
|
|
|
|
|
`(("libc" ,%bootstrap-glibc)
|
|
|
|
|
("gcc" ,%bootstrap-gcc)
|
|
|
|
|
("binutils" ,%bootstrap-binutils)
|
|
|
|
|
("coreutils&co" ,%bootstrap-coreutils&co)
|
|
|
|
|
;; In gnu-build-system.scm, we rely on the availability of Bash.
|
|
|
|
|
("bash" ,%bootstrap-coreutils&co)))))
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
|
2019-06-14 15:26:22 -04:00
|
|
|
|
(define %bootstrap-inputs-for-tests
|
|
|
|
|
;; These are bootstrap inputs that are cheap to produce (no compilation
|
|
|
|
|
;; needed) and that are meant to be used for testing. (These are those we
|
|
|
|
|
;; used before the Mes-based reduced bootstrap.)
|
|
|
|
|
`(("libc" ,%bootstrap-glibc)
|
|
|
|
|
("gcc" ,%bootstrap-gcc)
|
|
|
|
|
("binutils" ,%bootstrap-binutils)
|
|
|
|
|
("coreutils&co" ,%bootstrap-coreutils&co)
|
|
|
|
|
("bash" ,%bootstrap-coreutils&co)))
|
|
|
|
|
|
distro: Move bootstrap packages to (distro packages bootstrap).
* distro/packages/base.scm (glibc-dynamic-linker, %bootstrap-guile,
bootstrap-origin, package-from-tarball, %bootstrap-base-url,
%bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc,
%bootstrap-gcc, %bootstrap-inputs, package-with-bootstrap-guile): Move
to ...
* distro/packages/bootstrap.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* tests/builders.scm: Use (distro packages bootstrap).
(%bootstrap-guile): Remove.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise, and remove @@ to access %bootstrap-inputs.
* tests/derivations.scm: Use (distro packages bootstrap) and remove @@
to access %bootstrap-coreutils&co.
* HACKING (When the platform is supported by Nixpkgs): Update
accordingly.
2012-11-04 16:04:41 -05:00
|
|
|
|
;;; bootstrap.scm ends here
|