all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: 38063@debbugs.gnu.org
Subject: [bug#38063] [PATCH 2/2] bootstrap: Add m2-planet-boot0.
Date: Mon,  4 Nov 2019 23:42:43 +0100	[thread overview]
Message-ID: <20191104224243.19953-2-janneke@gnu.org> (raw)
In-Reply-To: <20191104224243.19953-1-janneke@gnu.org>

* gnu/packages/commencement.scm (m2-planet-boot0): New variable.
---
 gnu/packages/commencement.scm | 103 +++++++++++++++++++++++++++++++++-
 1 file changed, 102 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 54746151ce..31722b4cf3 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -84,6 +84,107 @@
 ;;;
 ;;; Code:
 
+(define-public m2-planet-boot0
+  ;; The soon-to-be initial bootstrap package: no binary inputs except for a
+  ;; ~500 byte binary seed: `x86/hex0-seed'.
+  (let* ((version "1.4.0")
+         (revision "0")
+         (commit "1fc2aeab483208bd2ba117b21df3894c182470ec")
+         (seed-version "Release_1.1")
+         (mescc-tools-version "Release_0.6.1")
+         (mes-m2-commit "f025a24b19e8447fb96ba1746bdad494ae63a514")
+         (mes-m2-version (string-append "0.19-" (string-take mes-m2-commit 7))))
+    (package
+      (inherit m2-planet)
+      (name "m2-planet-boot0")
+      (version (string-append version "-" revision "." (string-take commit 7)))
+      (source (origin
+                (method url-fetch)
+                (uri (string-append
+                      "https://github.com/oriansj/m2-planet"
+                      "/archive/" commit ".tar.gz"))
+                (file-name (string-append "mescc-tools-seed-" version ".tar.gz"))
+                (sha256
+                 (base32
+                  "09dfbhrkfq754lkk9qqsa95rgfp5crdwy8l4db97qwfclr0y914z"))))
+      (inputs `(("mescc-tools-seed"
+                 ,(bootstrap-origin
+                   (origin
+                     (method url-fetch)
+                     (uri (string-append
+                           "https://github.com/oriansj/mescc-tools-seed"
+                           "/archive/" seed-version ".tar.gz"))
+                     (file-name (string-append "mescc-tools-seed-" seed-version
+                                               ".tar.gz"))
+                     (sha256
+                      (base32
+                       "1ymkaanx3b9x8y3n4x0kpqxyjcql3gpv37hp1cbzvhwh89yqy6m4")))))
+                ("mescc-tools-source"
+                 ,(bootstrap-origin
+                   (origin
+                     (method url-fetch)
+                     (uri (string-append
+                           "https://github.com/oriansj/mescc-tools"
+                           "/archive/" mescc-tools-version ".tar.gz"))
+                     (file-name (string-append "mescc-tools-"
+                                               mescc-tools-version
+                                               ".tar.gz"))
+                     (sha256
+                      (base32
+                       "06jpvq6xfjzn2al6b4rdwd3zv3h4cvilc4n9gqcnjr9cr6wjpw2n")))))
+                ("mes-m2-source"
+                 ,(bootstrap-origin
+                   (origin
+                     (method url-fetch)
+                     (uri (string-append
+                           "https://github.com/oriansj/mes-m2"
+                           "/archive/" mes-m2-commit ".tar.gz"))
+                     (file-name (string-append "mes-m2-"
+                                               mes-m2-version
+                                               ".tar.gz"))
+                     (sha256
+                      (base32
+                       "092ydx21cms8rkgx5dfndxi4hrw9jqw9r266h4rsvycpv2lw6kp1")))))))
+      (native-inputs
+       `(("coreutils" , %bootstrap-coreutils&co)
+         ("guile" , %bootstrap-guile)))
+      (supported-systems '("i686-linux" "x86_64-linux"))
+      (build-system trivial-build-system)
+      (arguments
+       `(#:guile ,%bootstrap-guile
+         #:modules ((guix build utils))
+         #:builder (begin
+                     (use-modules (guix build utils))
+                     (let* ((mescc-tools-seed (assoc-ref %build-inputs "mescc-tools-seed"))
+                            (mescc-tools-source (assoc-ref %build-inputs "mescc-tools-source"))
+                            (mes-m2-source (assoc-ref %build-inputs "mes-m2-source"))
+                            (source (assoc-ref %build-inputs "source"))
+                            (dir (string-append "mescc-tools-seed-" ,seed-version))
+                            (coreutils (assoc-ref %build-inputs "coreutils"))
+                            (guile     (assoc-ref %build-inputs "guile"))
+                            (out       (assoc-ref %outputs "out"))
+                            (bindir    (string-append out "/bin")))
+                       (setenv "PATH" (string-append coreutils "/bin"))
+                       (invoke "tar" "--strip-components=1" "-xvf" mescc-tools-seed)
+                       (invoke "tar" "--strip-components=1" "-C" "mescc-tools" "-xvf" mescc-tools-source)
+                       (invoke "tar" "--strip-components=1" "-C" "M2-Planet" "-xvf" source)
+                       (invoke "tar" "--strip-components=1" "-C" "mes-m2" "-xvf" mes-m2-source)
+                       (mkdir-p bindir)
+                       (with-directory-excursion "x86"
+                         (invoke "../kaem-optional-seed" "--verbose" "--strict"))
+                       (with-directory-excursion "bin"
+                         (copy-file "mes-m2" "mes")
+                         (install-file "hex2" bindir)
+                         (install-file "M1" bindir)
+                         (install-file "blood-elf" bindir)
+                         (install-file "kaem" bindir)
+                         (install-file "get_machine" bindir)
+                         (install-file "get_machine" bindir)
+                         (install-file "M2-Planet" bindir)
+                         (install-file "mes" bindir)
+                         (install-file "mes-m2" bindir))
+                       #t)))))))
+
 (define mes-boot
   (package
     (inherit mes)
-- 
2.23.0

  reply	other threads:[~2019-11-04 22:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 22:39 [bug#38063] [PATCH 0/2] gnu: Add m2-planet-boot0 Jan Nieuwenhuizen
2019-11-04 22:42 ` [bug#38063] [PATCH 1/2] gnu: Add m2-planet Jan Nieuwenhuizen
2019-11-04 22:42   ` Jan Nieuwenhuizen [this message]
2019-11-13 22:26     ` [bug#38063] [PATCH 2/2] bootstrap: Add m2-planet-boot0 Ludovic Courtès
2019-11-14  5:56       ` Jan Nieuwenhuizen
2019-11-13 22:22   ` [bug#38063] [PATCH 1/2] gnu: Add m2-planet Ludovic Courtès
2019-11-14 15:48     ` bug#38063: " Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191104224243.19953-2-janneke@gnu.org \
    --to=janneke@gnu.org \
    --cc=38063@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.