aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2019-07-22 10:07:41 +0200
committerMark H Weaver <mhw@netris.org>2019-08-15 14:46:16 -0400
commited050b1cf51941046466d07ba7e94bd9fba02e00 (patch)
tree217b4d8307908b0fd5b554cfeae613e00e9f20b1
parentfb925c7257104077ccc8117087e60bec8b551f45 (diff)
downloadguix-ed050b1cf51941046466d07ba7e94bd9fba02e00.tar
guix-ed050b1cf51941046466d07ba7e94bd9fba02e00.tar.gz
bootstrap: Add mes-minimal-stripped-tarball.
* gnu/packages/make-bootstrap.scm (%mes-minimal, %mes-minimal-stripped, %mes-bootstrap-tarball): New variable. Modified-By: Mark H Weaver <mhw@netris.org>
-rw-r--r--gnu/packages/make-bootstrap.scm92
1 files changed, 92 insertions, 0 deletions
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 5d80f584a4..cf9f8b4633 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -49,6 +49,7 @@
%gcc-bootstrap-tarball
%guile-bootstrap-tarball
%mescc-tools-bootstrap-tarball
+ %mes-bootstrap-tarball
%bootstrap-tarballs
%guile-static-stripped))
@@ -598,6 +599,93 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
'( "M1" "blood-elf" "hex2"))
#t))))
(inputs `(("mescc-tools" ,%mescc-tools-static)))))
+
+;; (define-public %mes-minimal-stripped
+;; ;; A minimal Mes without documentation dependencies, for bootstrap.
+;; (let ((triplet "i686-unknown-linux-gnu"))
+;; (package
+;; (inherit mes)
+;; (name "mes-minimal-stripped")
+;; (native-inputs
+;; `(("guile" ,guile-2.2)))
+;; (arguments
+;; `(#:system "i686-linux"
+;; #:strip-binaries? #f
+;; #:configure-flags '("--mes")
+;; #:phases
+;; (modify-phases %standard-phases
+;; (delete 'patch-shebangs)
+;; (add-after 'install 'strip-install
+;; (lambda _
+;; (let* ((out (assoc-ref %outputs "out"))
+;; (share (string-append out "/share")))
+;; (delete-file-recursively (string-append out "/lib/guile"))
+;; (delete-file-recursively (string-append share "/guile"))
+;; (delete-file-recursively (string-append share "/mes/scaffold"))
+
+;; (for-each delete-file
+;; (find-files
+;; (string-append share "/mes/lib") "\\.(h|c)"))
+
+;; (for-each (lambda (dir)
+;; (for-each remove-store-references
+;; (find-files (string-append out "/" dir)
+;; ".*")))
+;; '("bin" "share/mes")))))))))))
+
+;; Two packages: first build static, bare minimum content.
+(define-public %mes-minimal
+ ;; A minimal Mes without documentation.
+ (let ((triplet "i686-unknown-linux-gnu"))
+ (package
+ (inherit mes)
+ (name "mes-minimal")
+ (native-inputs
+ `(("guile" ,guile-2.2)))
+ (arguments
+ `(#:system "i686-linux"
+ #:strip-binaries? #f
+ #:configure-flags '("--mes")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'patch-shebangs)
+ (add-after 'install 'strip-install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (share (string-append out "/share")))
+ (delete-file-recursively (string-append out "/lib/guile"))
+ (delete-file-recursively (string-append share "/guile"))
+ (delete-file-recursively (string-append share "/mes/scaffold"))
+
+ (for-each delete-file
+ (find-files
+ (string-append share "/mes/lib")
+ "\\.(h|c)")))))))))))
+
+;; next remove store references.
+(define %mes-minimal-stripped
+ ;; A minimal Mes with store references removed, for bootstrap.
+ (package
+ (inherit %mes-minimal)
+ (name (string-append (package-name %mes-minimal) "-stripped"))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((in (assoc-ref %build-inputs "mes"))
+ (out (assoc-ref %outputs "out")))
+
+ (copy-recursively in out)
+ (for-each (lambda (dir)
+ (for-each remove-store-references
+ (find-files (string-append out "/" dir)
+ ".*")))
+ '("bin" "share/mes"))
+ #t))))
+ (inputs `(("mes" ,%mes-minimal)))))
+
(define %guile-static
;; A statically-linked Guile that is relocatable--i.e., it can search
;; .scm and .go files relative to its installation directory, rather
@@ -769,6 +857,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
;; A tarball with statically-linked MesCC binary seed.
(tarball-package %mescc-tools-static-stripped))
+(define %mes-bootstrap-tarball
+ ;; A tarball with Mes binary seed.
+ (tarball-package %mes-minimal-stripped))
+
(define %bootstrap-tarballs
;; A single derivation containing all the bootstrap tarballs, for
;; convenience.