aboutsummaryrefslogtreecommitdiff
path: root/distro/packages
diff options
context:
space:
mode:
Diffstat (limited to 'distro/packages')
-rw-r--r--distro/packages/base.scm47
-rwxr-xr-xdistro/packages/bootstrap/x86_64-linux/bashbin0 -> 1419928 bytes
-rwxr-xr-xdistro/packages/bootstrap/x86_64-linux/mkdirbin0 -> 799312 bytes
-rwxr-xr-xdistro/packages/bootstrap/x86_64-linux/tarbin0 -> 1229888 bytes
-rwxr-xr-xdistro/packages/bootstrap/x86_64-linux/xzbin0 -> 926000 bytes
5 files changed, 46 insertions, 1 deletions
diff --git a/distro/packages/base.scm b/distro/packages/base.scm
index 8ffdbf635d..35db11e7de 100644
--- a/distro/packages/base.scm
+++ b/distro/packages/base.scm
@@ -21,8 +21,11 @@
#:use-module (guix packages)
#:use-module (guix ftp)
#:use-module (guix http)
+ #:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module ((guix store) #:select (add-to-store add-text-to-store))
+ #:use-module ((guix derivations) #:select (derivation))
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
@@ -1386,7 +1389,49 @@ with the Linux kernel.")
(define %bootstrap-guile
;; The Guile used to run the build scripts of the initial derivations.
- (nixpkgs-derivation* "guile"))
+ ;; 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
+ (name "raw")
+ (description "Raw build system with direct store access")
+ (build (lambda* (store name source inputs #:key outputs system)
+ (define (->store file)
+ (add-to-store store file #t #t "sha256"
+ (search-bootstrap-binary file system)))
+
+ (let* ((tar (->store "tar"))
+ (xz (->store "xz"))
+ (mkdir (->store "mkdir"))
+ (bash (->store "bash"))
+ (guile (->store "guile-bootstrap-2.0.6.tar.xz"))
+ (builder
+ (add-text-to-store store
+ "build-bootstrap-guile.sh"
+ (format #f "
+echo \"unpacking bootstrap Guile to '$out'...\"
+~a $out
+cd $out
+~a -dc < ~a | ~a xv
+
+# Sanity check.
+$out/bin/guile --version~%"
+ mkdir xz guile tar)
+ (list mkdir xz guile tar))))
+ (derivation store name system
+ bash `(,builder) '()
+ `((,bash) (,builder)))))))))
+ (package
+ (name "guile-bootstrap")
+ (version "2.0")
+ (source #f)
+ (build-system raw)
+ (description "Bootstrap Guile")
+ (long-description "Pre-built Guile for bootstrapping purposes.")
+ (home-page #f)
+ (license "LGPLv3+"))))
(define (default-keyword-arguments args defaults)
"Return ARGS augmented with any keyword/value from DEFAULTS for
diff --git a/distro/packages/bootstrap/x86_64-linux/bash b/distro/packages/bootstrap/x86_64-linux/bash
new file mode 100755
index 0000000000..81114f79c3
--- /dev/null
+++ b/distro/packages/bootstrap/x86_64-linux/bash
Binary files differ
diff --git a/distro/packages/bootstrap/x86_64-linux/mkdir b/distro/packages/bootstrap/x86_64-linux/mkdir
new file mode 100755
index 0000000000..226865dfe6
--- /dev/null
+++ b/distro/packages/bootstrap/x86_64-linux/mkdir
Binary files differ
diff --git a/distro/packages/bootstrap/x86_64-linux/tar b/distro/packages/bootstrap/x86_64-linux/tar
new file mode 100755
index 0000000000..c9a2c27d13
--- /dev/null
+++ b/distro/packages/bootstrap/x86_64-linux/tar
Binary files differ
diff --git a/distro/packages/bootstrap/x86_64-linux/xz b/distro/packages/bootstrap/x86_64-linux/xz
new file mode 100755
index 0000000000..02f9014740
--- /dev/null
+++ b/distro/packages/bootstrap/x86_64-linux/xz
Binary files differ