gnu: rust: Update to 1.35.0.
[jackhill/guix/guix.git] / gnu / packages / mes.scm
CommitLineData
1c7a78f1 1;;; GNU Guix --- Functional package management for GNU
d236c51c 2;;; Copyright © 2017,2018 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)
24 #:use-module (gnu packages commencement)
25 #:use-module (gnu packages cross-base)
26 #:use-module (gnu packages gcc)
256d5c6e 27 #:use-module (gnu packages graphviz)
1c7a78f1 28 #:use-module (gnu packages guile)
00c86a88 29 #:use-module (gnu packages man)
1c7a78f1
JN
30 #:use-module (gnu packages package-management)
31 #:use-module (gnu packages perl)
b8016467 32 #:use-module (gnu packages pkg-config)
00c86a88 33 #:use-module (gnu packages texinfo)
1c7a78f1 34 #:use-module (guix build-system gnu)
4be01412 35 #:use-module (guix download)
1c7a78f1
JN
36 #:use-module (guix git-download)
37 #:use-module (guix licenses)
38 #:use-module (guix packages))
39
b8016467 40(define-public nyacc-0.86
4be01412
JN
41 (package
42 (name "nyacc")
445ecce9 43 (version "0.86.0")
4be01412
JN
44 (source (origin
45 (method url-fetch)
46 (uri (string-append "mirror://savannah/nyacc/"
47 name "-" version ".tar.gz"))
445ecce9 48 (patches (search-patches "nyacc-binary-literals.patch"))
4be01412
JN
49 (sha256
50 (base32
445ecce9 51 "0lkd9lyspvhxlfs0496gsllwinh62jk9wij6gpadvx9gwz6yavd9"))))
4be01412
JN
52 (build-system gnu-build-system)
53 (native-inputs
54 `(("guile" ,guile-2.2)))
55 (synopsis "LALR(1) Parser Generator in Guile")
56 (description
57 "NYACC is an LALR(1) parser generator implemented in Guile.
58The syntax and nomenclature should be considered not stable. It comes with
59extensive examples, including parsers for the Javascript and C99 languages.")
60 (home-page "https://savannah.nongnu.org/projects/nyacc")
61 (license (list gpl3+ lgpl3+))))
62
b8016467
LC
63(define-public nyacc
64 (package
65 (inherit nyacc-0.86)
66 (version "0.94.0")
67 (source (origin
68 (method url-fetch)
69 (uri (string-append "mirror://savannah/nyacc/nyacc-"
70 version ".tar.gz"))
71 (sha256
72 (base32
73 "12qnzwm1n3j8z7hbr9hy2wka9a1aasm2rvnpnvdxkjcsbdzj8fn4"))
74 (modules '((guix build utils)))
75 (snippet
76 '(begin
77 (substitute* (find-files "." "^Makefile\\.in$")
78 (("^SITE_SCM_DIR =.*")
79 "SITE_SCM_DIR = \
80@prefix@/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
81 (("^SITE_SCM_GO_DIR =.*")
82 "SITE_SCM_GO_DIR = \
83@prefix@/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")
84 (("^INFODIR =.*")
85 "INFODIR = @prefix@/share/info\n")
86 (("^DOCDIR =.*")
87 "DOCDIR = @prefix@/share/doc/$(PACKAGE_TARNAME)\n"))
88 #t))))
89 (native-inputs
90 `(("pkg-config" ,pkg-config)))
91 (inputs
92 `(("guile" ,guile-2.2)))))
93
1c7a78f1 94(define-public mes
0a01bb55
DM
95 (package
96 (name "mes")
97 (version "0.19")
98 (source (origin
99 (method url-fetch)
100 (uri (string-append "mirror://gnu/mes/"
101 "mes-" version ".tar.gz"))
102 (sha256
103 (base32
104 "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0"))))
105 (build-system gnu-build-system)
106 (supported-systems '("i686-linux" "x86_64-linux"))
107 (propagated-inputs
108 `(("mescc-tools" ,mescc-tools)
b8016467
LC
109
110 ;; XXX: MesCC appears to enter an infinite loop (?) while building
111 ;; crt1.o when we switch to nyacc 0.94.
112 ("nyacc" ,nyacc-0.86)))
0a01bb55
DM
113 (native-inputs
114 `(("guile" ,guile-2.2)
115 ,@(let ((target-system (or (%current-target-system)
116 (%current-system))))
117 (cond
118 ((string-prefix? "x86_64-linux" target-system)
119 ;; Use cross-compiler rather than #:system "i686-linux" to get
120 ;; MesCC 64 bit .go files installed ready for use with Guile.
121 `(("i686-linux-binutils" ,(cross-binutils "i686-unknown-linux-gnu"))
122 ("i686-linux-gcc" ,(cross-gcc "i686-unknown-linux-gnu"))))
123 (else
124 '())))
125 ("graphviz" ,graphviz)
126 ("help2man" ,help2man)
127 ("perl" ,perl) ; build-aux/gitlog-to-changelog
128 ("texinfo" ,texinfo)))
129 (arguments
130 `(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
131 (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
132 (description
133 "GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed
504d9fcb
JN
134bootstrap to Guix and aims to help create full source bootstrapping for
135GNU/Linux distributions. It consists of a mutual self-hosting Scheme
136interpreter in C and a Nyacc-based C compiler in Scheme and is compatible with
137Guile.")
0a01bb55
DM
138 (home-page "https://gnu.org/software/mes")
139 (license gpl3+)))
9ae3fcb9
JN
140
141(define-public mescc-tools
142 (package
143 (name "mescc-tools")
8a502c3b 144 (version "0.5.2")
9ae3fcb9
JN
145 (source (origin
146 (method url-fetch)
147 (uri (string-append
8a502c3b
JN
148 "http://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/"
149 name "-Release_" version
9ae3fcb9
JN
150 ".tar.gz"))
151 (file-name (string-append name "-" version ".tar.gz"))
152 (sha256
153 (base32
8a502c3b 154 "01x7bhmgwyf6mc2g1hcvibhps98nllacqm4f0j5l51b1mbi18pc2"))))
9ae3fcb9 155 (build-system gnu-build-system)
0b689430 156 (supported-systems '("i686-linux" "x86_64-linux"))
9ae3fcb9
JN
157 (arguments
158 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
159 #:test-target "test"
160 #:phases (modify-phases %standard-phases
8a502c3b 161 (delete 'configure))))
9ae3fcb9
JN
162 (synopsis "Tools for the full source bootstrapping process")
163 (description
164 "Mescc-tools is a collection of tools for use in a full source
8a502c3b
JN
165bootstrapping process. It consists of the M1 macro assembler, the hex2
166linker, the blood-elf symbol table generator, the kaem shell, exec_enable and
167get_machine.")
168 (home-page "https://savannah.nongnu.org/projects/mescc-tools")
9ae3fcb9 169 (license gpl3+)))