1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018, 2019 Jan Nieuwenhuizen <janneke@gnu.org>
3 ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
21 (define-module (gnu packages mes)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages base)
24 #:use-module (gnu packages cross-base)
25 #:use-module (gnu packages gcc)
26 #:use-module (gnu packages graphviz)
27 #:use-module (gnu packages guile)
28 #:use-module (gnu packages man)
29 #:use-module (gnu packages package-management)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages texinfo)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix download)
35 #:use-module (guix git-download)
36 #:use-module (guix licenses)
37 #:use-module (guix packages)
38 #:use-module (guix utils))
40 (define-public nyacc-0.86
41 ;; Nyacc used for bootstrap.
47 (uri (string-append "mirror://savannah/nyacc/"
48 name "-" version ".tar.gz"))
49 (patches (search-patches "nyacc-binary-literals.patch"))
52 "0lkd9lyspvhxlfs0496gsllwinh62jk9wij6gpadvx9gwz6yavd9"))))
53 (build-system gnu-build-system)
55 `(("guile" ,guile-2.2)))
56 (synopsis "LALR(1) Parser Generator in Guile")
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+))))
70 (uri (string-append "mirror://savannah/nyacc/nyacc-"
74 "0hl5qxx19i4x1r0839sxm19ziqq65g4hy97yik81cc2yb9yvgyv3"))
75 (modules '((guix build utils)))
78 (substitute* (find-files "." "^Makefile\\.in$")
79 (("^SITE_SCM_DIR =.*")
81 @prefix@/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
82 (("^SITE_SCM_GO_DIR =.*")
84 @prefix@/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")
86 "INFODIR = @prefix@/share/info\n")
88 "DOCDIR = @prefix@/share/doc/$(PACKAGE_TARNAME)\n"))
91 `(("pkg-config" ,pkg-config)))
93 `(("guile" ,guile-2.2)))))
95 (define-public mes-0.19
96 ;; Mes used for bootstrap.
102 (uri (string-append "mirror://gnu/mes/"
103 "mes-" version ".tar.gz"))
106 "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0"))))
107 (build-system gnu-build-system)
108 (supported-systems '("i686-linux" "x86_64-linux"))
110 `(("mescc-tools" ,mescc-tools-0.5.2)
111 ("nyacc" ,nyacc-0.86)))
113 `(("guile" ,guile-2.2)
114 ,@(let ((target-system (or (%current-target-system)
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"))))
124 ("graphviz" ,graphviz)
125 ("help2man" ,help2man)
126 ("perl" ,perl) ; build-aux/gitlog-to-changelog
127 ("texinfo" ,texinfo)))
129 `(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
130 (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
132 "GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed
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
137 (home-page "https://gnu.org/software/mes")
146 (uri (string-append "mirror://gnu/mes/"
147 "mes-" version ".tar.gz"))
150 "04pajp8v31na34ls4730ig5f6miiplhdvkmsb9ls1b8bbmw2vb4n"))))
152 `(("mescc-tools" ,mescc-tools)
155 (define-public mescc-tools-0.5.2
156 ;; Mescc-tools used for bootstrap.
157 (let ((commit "bb062b0da7bf2724ca40f9002b121579898d4ef7")
162 (version (string-append version "-" revision "." (string-take commit 7)))
166 "https://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/"
171 "1h6j57wyf91i42b26f8msbv6451cw3nm4nmpl1fckp9c7vi8mwkh"))))
172 (build-system gnu-build-system)
173 (supported-systems '("i686-linux" "x86_64-linux"))
175 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
177 #:phases (modify-phases %standard-phases
178 (delete 'configure))))
179 (synopsis "Tools for the full source bootstrapping process")
181 "Mescc-tools is a collection of tools for use in a full source
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
185 (home-page "https://savannah.nongnu.org/projects/mescc-tools")
188 (define-public mescc-tools
190 (inherit mescc-tools-0.5.2)
196 "http://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/"
197 name "-Release_" version
199 (file-name (string-append name "-" version ".tar.gz"))
202 "06jpvq6xfjzn2al6b4rdwd3zv3h4cvilc4n9gqcnjr9cr6wjpw2n"))))
204 (substitute-keyword-arguments (package-arguments mescc-tools-0.5.2)
206 `(list (string-append "PREFIX=" (assoc-ref %outputs "out"))