* [bug#38063] [PATCH 0/2] gnu: Add m2-planet-boot0.
@ 2019-11-04 22:39 Jan Nieuwenhuizen
2019-11-04 22:42 ` [bug#38063] [PATCH 1/2] gnu: Add m2-planet Jan Nieuwenhuizen
0 siblings, 1 reply; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2019-11-04 22:39 UTC (permalink / raw)
To: 38063; +Cc: Jeremiah Orians
Hi!
Following this great news by Jeremiah Orians today
https://lists.reproducible-builds.org/pipermail/rb-general/2019-November/001711.html
I decided to create a first bootstrap package for M2-Planet. For now
this is mostly "Just for Fun".
The gap to building the next package of the bootstrap: `mes-boot' has
not been bridged yet, although GNU Mes is also close to being
bootstrappable with M2-Planet.
Note that disregarding the build tools (bootstrap-guile,
bootstrap-coreutils&co), this package builds M2-Planet using only a ~500
byte binary seed!
Many thanks to Jeremiah!
Enjoy and Greetings,
janneke
Jan Nieuwenhuizen (2):
gnu: Add m2-planet.
bootstrap: Add m2-planet-boot0.
gnu/packages/commencement.scm | 103 +++++++++++++++++++++++++++++++++-
gnu/packages/mes.scm | 32 +++++++++++
2 files changed, 134 insertions(+), 1 deletion(-)
--
2.23.0
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#38063] [PATCH 1/2] gnu: Add m2-planet.
2019-11-04 22:39 [bug#38063] [PATCH 0/2] gnu: Add m2-planet-boot0 Jan Nieuwenhuizen
@ 2019-11-04 22:42 ` Jan Nieuwenhuizen
2019-11-04 22:42 ` [bug#38063] [PATCH 2/2] bootstrap: Add m2-planet-boot0 Jan Nieuwenhuizen
2019-11-13 22:22 ` [bug#38063] [PATCH 1/2] gnu: Add m2-planet Ludovic Courtès
0 siblings, 2 replies; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2019-11-04 22:42 UTC (permalink / raw)
To: 38063
* gnu/packages/mes.scm (m2-planet): New variable.
---
gnu/packages/mes.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 3174c0c115..55d731d876 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -204,3 +204,35 @@ get_machine.")
((#:make-flags _)
`(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
"CC=gcc"))))))
+
+(define-public m2-planet
+ (let ((commit "1fc2aeab483208bd2ba117b21df3894c182470ec")
+ (revision "0"))
+ (package
+ (name "m2-planet")
+ (version (string-append "1.4.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/oriansj/m2-planet.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1fj3xiqcibdfi78b43nn6w8hs3vkz32yb06n8r5mna8pnjdmn00l"))))
+ (native-inputs
+ `(("mescc-tools" ,mescc-tools)))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (delete 'bootstrap)
+ (delete 'configure))))
+ (synopsis "The PLAtform NEutral Transpiler")
+ (description
+ "M2-Planet, The PLAtform NEutral Transpiler, when combined with
+mescc-tools compiles a subset of the C language into working binaries
+with introspective steps inbetween.")
+ (home-page "https://github.com/oriansj/m2-planet")
+ (license gpl3+))))
--
2.23.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#38063] [PATCH 2/2] bootstrap: Add m2-planet-boot0.
2019-11-04 22:42 ` [bug#38063] [PATCH 1/2] gnu: Add m2-planet Jan Nieuwenhuizen
@ 2019-11-04 22:42 ` Jan Nieuwenhuizen
2019-11-13 22:26 ` Ludovic Courtès
2019-11-13 22:22 ` [bug#38063] [PATCH 1/2] gnu: Add m2-planet Ludovic Courtès
1 sibling, 1 reply; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2019-11-04 22:42 UTC (permalink / raw)
To: 38063
* 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#38063] [PATCH 2/2] bootstrap: Add m2-planet-boot0.
2019-11-04 22:42 ` [bug#38063] [PATCH 2/2] bootstrap: Add m2-planet-boot0 Jan Nieuwenhuizen
@ 2019-11-13 22:26 ` Ludovic Courtès
2019-11-14 5:56 ` Jan Nieuwenhuizen
0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2019-11-13 22:26 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: 38063
Hi,
Jan Nieuwenhuizen <janneke@gnu.org> skribis:
> * gnu/packages/commencement.scm (m2-planet-boot0): New variable.
Since this is currently unused, should we postpone and review it as part
of a bigger change that will actually use it? What do you prefer?
> +(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))))
This is a bit intimidating. ;-) It would be great if we could refer to
releases only, and perhaps we don’t need to have all these in this
‘define’?
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/oriansj/m2-planet"
> + "/archive/" commit ".tar.gz"))
Unless I’m mistaken, /archive tarballs are automatically generated and
should thus be avoided.
However, using ‘git-fetch’ here is not quite feasible because it could
lead to bootstrapping problems (“soft” bootstrapping problems, because
these are fixed-output derivations, but still.)
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#38063] [PATCH 2/2] bootstrap: Add m2-planet-boot0.
2019-11-13 22:26 ` Ludovic Courtès
@ 2019-11-14 5:56 ` Jan Nieuwenhuizen
0 siblings, 0 replies; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2019-11-14 5:56 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 38063
Ludovic Courtès writes:
Hello Ludo',
> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>> * gnu/packages/commencement.scm (m2-planet-boot0): New variable.
>
> Since this is currently unused, should we postpone and review it as part
> of a bigger change that will actually use it? What do you prefer?
Yes, I think that's wise. I was so excited that I wanted to share this
recipe. The releases that we need for a proper packaging will take some
serious time and effort.
>> +(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))))
>
> This is a bit intimidating. ;-) It would be great if we could refer to
> releases only, and perhaps we don’t need to have all these in this
> ‘define’?
Sure! I am hoping to drop mes-m2 here and use tarballs; even if we have
to hand-craft them and host them ourselves.
>> + (method url-fetch)
>> + (uri (string-append
>> + "https://github.com/oriansj/m2-planet"
>> + "/archive/" commit ".tar.gz"))
>
> Unless I’m mistaken, /archive tarballs are automatically generated and
> should thus be avoided.
>
> However, using ‘git-fetch’ here is not quite feasible because it could
> lead to bootstrapping problems (“soft” bootstrapping problems, because
> these are fixed-output derivations, but still.)
Yes...
I will close this issue after giving the plain m2-planet a proper
description.
Thanks for looking a it ;-)
Greetings,
janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#38063] [PATCH 1/2] gnu: Add m2-planet.
2019-11-04 22:42 ` [bug#38063] [PATCH 1/2] gnu: Add m2-planet Jan Nieuwenhuizen
2019-11-04 22:42 ` [bug#38063] [PATCH 2/2] bootstrap: Add m2-planet-boot0 Jan Nieuwenhuizen
@ 2019-11-13 22:22 ` Ludovic Courtès
2019-11-14 15:48 ` bug#38063: " Jan Nieuwenhuizen
1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2019-11-13 22:22 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: 38063
Hello,
Jan Nieuwenhuizen <janneke@gnu.org> skribis:
> * gnu/packages/mes.scm (m2-planet): New variable.
[...]
> + (synopsis "The PLAtform NEutral Transpiler")
> + (description
> + "M2-Planet, The PLAtform NEutral Transpiler, when combined with
> +mescc-tools compiles a subset of the C language into working binaries
> +with introspective steps inbetween.")
It would be awesome if you could add one or two sentences here.
Regardless it LGTM!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#38063: [PATCH 1/2] gnu: Add m2-planet.
2019-11-13 22:22 ` [bug#38063] [PATCH 1/2] gnu: Add m2-planet Ludovic Courtès
@ 2019-11-14 15:48 ` Jan Nieuwenhuizen
0 siblings, 0 replies; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2019-11-14 15:48 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 38063-done
Ludovic Courtès writes:
>> + (description
>> + "M2-Planet, The PLAtform NEutral Transpiler, when combined with
>> +mescc-tools compiles a subset of the C language into working binaries
>> +with introspective steps inbetween.")
>
> It would be awesome if you could add one or two sentences here.
I added two sentences:
(description
"M2-Planet, the PLAtform NEutral Transpiler, when combined with
mescc-tools, compiles a subset of the C language into working binaries with
introspective steps inbetween. It is self-hosting and for bootstrapping it
also has an implementation in the M1 macro assembly language. M2-Planet is
built as Phase-5 of the full source bootstrapping process and is capable of
building GNU Mes.")
> Regardless it LGTM!
Closed and pushed to master as 99b340f5eeb742d966dd16b1bfd7d2b308edc75f
Thanks,
janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-11-14 15:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [bug#38063] [PATCH 2/2] bootstrap: Add m2-planet-boot0 Jan Nieuwenhuizen
2019-11-13 22:26 ` 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
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).