Commit | Line | Data |
---|---|---|
1c7a78f1 | 1 | ;;; GNU Guix --- Functional package management for GNU |
86c3a506 | 2 | ;;; Copyright © 2017, 2018, 2019 Jan Nieuwenhuizen <janneke@gnu.org> |
beb7e659 | 3 | ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
05ee5102 | 4 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
1c7a78f1 JN |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
21 | (define-module (gnu packages mes) | |
22 | #:use-module (gnu packages) | |
23 | #:use-module (gnu packages base) | |
1c7a78f1 JN |
24 | #:use-module (gnu packages cross-base) |
25 | #:use-module (gnu packages gcc) | |
256d5c6e | 26 | #:use-module (gnu packages graphviz) |
1c7a78f1 | 27 | #:use-module (gnu packages guile) |
00c86a88 | 28 | #:use-module (gnu packages man) |
1c7a78f1 JN |
29 | #:use-module (gnu packages package-management) |
30 | #:use-module (gnu packages perl) | |
b8016467 | 31 | #:use-module (gnu packages pkg-config) |
00c86a88 | 32 | #:use-module (gnu packages texinfo) |
1c7a78f1 | 33 | #:use-module (guix build-system gnu) |
4be01412 | 34 | #:use-module (guix download) |
1c7a78f1 JN |
35 | #:use-module (guix git-download) |
36 | #:use-module (guix licenses) | |
066cb9ba JN |
37 | #:use-module (guix packages) |
38 | #:use-module (guix utils)) | |
1c7a78f1 | 39 | |
b8016467 | 40 | (define-public nyacc-0.86 |
bffd8fcd | 41 | ;; Nyacc used for bootstrap. |
4be01412 JN |
42 | (package |
43 | (name "nyacc") | |
445ecce9 | 44 | (version "0.86.0") |
4be01412 JN |
45 | (source (origin |
46 | (method url-fetch) | |
47 | (uri (string-append "mirror://savannah/nyacc/" | |
48 | name "-" version ".tar.gz")) | |
445ecce9 | 49 | (patches (search-patches "nyacc-binary-literals.patch")) |
4be01412 JN |
50 | (sha256 |
51 | (base32 | |
445ecce9 | 52 | "0lkd9lyspvhxlfs0496gsllwinh62jk9wij6gpadvx9gwz6yavd9")))) |
4be01412 JN |
53 | (build-system gnu-build-system) |
54 | (native-inputs | |
55 | `(("guile" ,guile-2.2))) | |
56 | (synopsis "LALR(1) Parser Generator in Guile") | |
57 | (description | |
58 | "NYACC is an LALR(1) parser generator implemented in Guile. | |
59 | The syntax and nomenclature should be considered not stable. It comes with | |
60 | extensive examples, including parsers for the Javascript and C99 languages.") | |
61 | (home-page "https://savannah.nongnu.org/projects/nyacc") | |
62 | (license (list gpl3+ lgpl3+)))) | |
63 | ||
b8016467 LC |
64 | (define-public nyacc |
65 | (package | |
66 | (inherit nyacc-0.86) | |
86c3a506 | 67 | (version "0.99.0") |
b8016467 LC |
68 | (source (origin |
69 | (method url-fetch) | |
70 | (uri (string-append "mirror://savannah/nyacc/nyacc-" | |
71 | version ".tar.gz")) | |
72 | (sha256 | |
73 | (base32 | |
86c3a506 | 74 | "0hl5qxx19i4x1r0839sxm19ziqq65g4hy97yik81cc2yb9yvgyv3")) |
b8016467 LC |
75 | (modules '((guix build utils))) |
76 | (snippet | |
77 | '(begin | |
78 | (substitute* (find-files "." "^Makefile\\.in$") | |
79 | (("^SITE_SCM_DIR =.*") | |
80 | "SITE_SCM_DIR = \ | |
81 | @prefix@/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n") | |
82 | (("^SITE_SCM_GO_DIR =.*") | |
83 | "SITE_SCM_GO_DIR = \ | |
84 | @prefix@/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n") | |
85 | (("^INFODIR =.*") | |
86 | "INFODIR = @prefix@/share/info\n") | |
87 | (("^DOCDIR =.*") | |
88 | "DOCDIR = @prefix@/share/doc/$(PACKAGE_TARNAME)\n")) | |
89 | #t)))) | |
90 | (native-inputs | |
91 | `(("pkg-config" ,pkg-config))) | |
92 | (inputs | |
93 | `(("guile" ,guile-2.2))))) | |
94 | ||
bffd8fcd JN |
95 | (define-public mes-0.19 |
96 | ;; Mes used for bootstrap. | |
0a01bb55 DM |
97 | (package |
98 | (name "mes") | |
bffd8fcd | 99 | (version "0.19") |
0a01bb55 DM |
100 | (source (origin |
101 | (method url-fetch) | |
102 | (uri (string-append "mirror://gnu/mes/" | |
103 | "mes-" version ".tar.gz")) | |
104 | (sha256 | |
105 | (base32 | |
bffd8fcd | 106 | "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0")))) |
0a01bb55 DM |
107 | (build-system gnu-build-system) |
108 | (supported-systems '("i686-linux" "x86_64-linux")) | |
109 | (propagated-inputs | |
bffd8fcd JN |
110 | `(("mescc-tools" ,mescc-tools-0.5.2) |
111 | ("nyacc" ,nyacc-0.86))) | |
0a01bb55 DM |
112 | (native-inputs |
113 | `(("guile" ,guile-2.2) | |
114 | ,@(let ((target-system (or (%current-target-system) | |
115 | (%current-system)))) | |
116 | (cond | |
117 | ((string-prefix? "x86_64-linux" target-system) | |
118 | ;; Use cross-compiler rather than #:system "i686-linux" to get | |
119 | ;; MesCC 64 bit .go files installed ready for use with Guile. | |
120 | `(("i686-linux-binutils" ,(cross-binutils "i686-unknown-linux-gnu")) | |
121 | ("i686-linux-gcc" ,(cross-gcc "i686-unknown-linux-gnu")))) | |
122 | (else | |
123 | '()))) | |
124 | ("graphviz" ,graphviz) | |
125 | ("help2man" ,help2man) | |
126 | ("perl" ,perl) ; build-aux/gitlog-to-changelog | |
127 | ("texinfo" ,texinfo))) | |
128 | (arguments | |
129 | `(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries | |
130 | (synopsis "Scheme interpreter and C compiler for full source bootstrapping") | |
131 | (description | |
132 | "GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed | |
c9941771 JN |
133 | bootstrap to Guix and aims to help create full source bootstrapping for |
134 | GNU/Linux distributions. It consists of a mutual self-hosting Scheme | |
135 | interpreter in C and a Nyacc-based C compiler in Scheme and is compatible with | |
136 | Guile.") | |
0a01bb55 DM |
137 | (home-page "https://gnu.org/software/mes") |
138 | (license gpl3+))) | |
9ae3fcb9 | 139 | |
bffd8fcd JN |
140 | (define-public mes |
141 | (package | |
142 | (inherit mes-0.19) | |
2baed642 | 143 | (version "0.21") |
bffd8fcd JN |
144 | (source (origin |
145 | (method url-fetch) | |
146 | (uri (string-append "mirror://gnu/mes/" | |
147 | "mes-" version ".tar.gz")) | |
148 | (sha256 | |
149 | (base32 | |
2baed642 | 150 | "104qxngxyl7pql8vqrnli3wfyx0ayfaqg8gjfhmk4qzrafs46slm")))) |
bffd8fcd JN |
151 | (propagated-inputs |
152 | `(("mescc-tools" ,mescc-tools) | |
153 | ("nyacc" ,nyacc))))) | |
154 | ||
066cb9ba JN |
155 | (define-public mescc-tools-0.5.2 |
156 | ;; Mescc-tools used for bootstrap. | |
7cbf6f1c JN |
157 | (let ((commit "bb062b0da7bf2724ca40f9002b121579898d4ef7") |
158 | (revision "0") | |
159 | (version "0.5.2")) | |
160 | (package | |
161 | (name "mescc-tools") | |
81a4ca08 | 162 | (version (git-version version revision commit)) |
7cbf6f1c | 163 | (source (origin |
81a4ca08 LC |
164 | (method git-fetch) |
165 | (uri (git-reference | |
166 | (url "https://git.savannah.nongnu.org/r/mescc-tools.git") | |
167 | (commit commit))) | |
168 | (file-name (git-file-name name version)) | |
7cbf6f1c JN |
169 | (sha256 |
170 | (base32 | |
81a4ca08 | 171 | "1nc6rnax66vmhqsjg0kgx23pihdcxmww6v325ywf59vsq1jqjvff")))) |
7cbf6f1c JN |
172 | (build-system gnu-build-system) |
173 | (supported-systems '("i686-linux" "x86_64-linux")) | |
174 | (arguments | |
175 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
176 | #:test-target "test" | |
177 | #:phases (modify-phases %standard-phases | |
178 | (delete 'configure)))) | |
179 | (synopsis "Tools for the full source bootstrapping process") | |
180 | (description | |
181 | "Mescc-tools is a collection of tools for use in a full source | |
8a502c3b JN |
182 | bootstrapping process. It consists of the M1 macro assembler, the hex2 |
183 | linker, the blood-elf symbol table generator, the kaem shell, exec_enable and | |
184 | get_machine.") | |
185 | (home-page "https://savannah.nongnu.org/projects/mescc-tools") | |
7cbf6f1c | 186 | (license gpl3+)))) |
9ff87bb9 | 187 | |
066cb9ba | 188 | (define-public mescc-tools |
9ae3fcb9 | 189 | (package |
066cb9ba | 190 | (inherit mescc-tools-0.5.2) |
9ae3fcb9 | 191 | (name "mescc-tools") |
9aed1de3 | 192 | (version "0.6.1") |
9ae3fcb9 | 193 | (source (origin |
81a4ca08 LC |
194 | (method git-fetch) |
195 | (uri (git-reference | |
196 | (url "https://git.savannah.nongnu.org/r/mescc-tools.git") | |
197 | (commit (string-append "Release_" version)))) | |
198 | (file-name (string-append "mescc-tools-" version "-checkout")) | |
9ae3fcb9 JN |
199 | (sha256 |
200 | (base32 | |
81a4ca08 | 201 | "1cgxcdza6ws725x84i31la7jxmlk5a3nsij5shz1zljg0i36kj99")))) |
066cb9ba JN |
202 | (arguments |
203 | (substitute-keyword-arguments (package-arguments mescc-tools-0.5.2) | |
204 | ((#:make-flags _) | |
205 | `(list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
206 | "CC=gcc")))))) | |
99b340f5 JN |
207 | |
208 | (define-public m2-planet | |
209 | (let ((commit "b87ddb0051b168ea45f8d49a610dcd069263336a") | |
210 | (revision "2")) | |
211 | (package | |
212 | (name "m2-planet") | |
213 | (version (string-append "1.4.0-" revision "." (string-take commit 7))) | |
214 | (source (origin | |
215 | (method git-fetch) | |
216 | (uri (git-reference | |
217 | (url "https://github.com/oriansj/m2-planet.git") | |
218 | (commit commit))) | |
219 | (file-name (git-file-name name version)) | |
220 | (sha256 | |
221 | (base32 | |
222 | "0yyc0fcbbxi9jqa1n76x0rwspdrwmc8g09jlmsw9c35nflrhmz8q")))) | |
223 | (native-inputs | |
224 | `(("mescc-tools" ,mescc-tools))) | |
225 | (build-system gnu-build-system) | |
226 | (arguments | |
227 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
228 | #:tests? #f | |
229 | #:phases (modify-phases %standard-phases | |
230 | (delete 'bootstrap) | |
231 | (delete 'configure)))) | |
232 | (synopsis "The PLAtform NEutral Transpiler") | |
233 | (description | |
234 | "M2-Planet, the PLAtform NEutral Transpiler, when combined with | |
235 | mescc-tools, compiles a subset of the C language into working binaries with | |
236 | introspective steps inbetween. It is self-hosting and for bootstrapping it | |
237 | also has an implementation in the M1 macro assembly language. M2-Planet is | |
238 | built as Phase-5 of the full source bootstrapping process and is capable of | |
239 | building GNU Mes.") | |
240 | (home-page "https://github.com/oriansj/m2-planet") | |
241 | (license gpl3+)))) |