[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: bootstrap: Add mes-minimal-stripped-tarball.
From: |
guix-commits |
Subject: |
02/02: bootstrap: Add mes-minimal-stripped-tarball. |
Date: |
Mon, 22 Jul 2019 04:18:47 -0400 (EDT) |
janneke pushed a commit to branch wip-binaries
in repository guix.
commit 2a21182410148fd3fd7d44ebf680dfd15d12ec6b
Author: Jan Nieuwenhuizen <address@hidden>
Date: Mon Jul 22 10:09:29 2019 +0200
bootstrap: Add mes-minimal-stripped-tarball.
* gnu/packages/make-bootstrap.scm (%mes-minimal, %mes-minimal-stripped,
%mes-bootstrap-tarball): New variable.
---
gnu/packages/make-bootstrap.scm | 92 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index c4a1e6a..1dd2005 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -47,6 +47,7 @@
%glibc-bootstrap-tarball
%gcc-bootstrap-tarball
%mescc-tools-bootstrap-tarball
+ %mes-bootstrap-tarball
%guile-bootstrap-tarball
%bootstrap-tarballs
@@ -577,6 +578,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
@@ -744,6 +832,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.