projects/guix·blob python-team · refs

276 lines · 11.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017-2025 Janneke Nieuwenhuizen <[email protected]>
3;;; Copyright © 2017, 2018 Efraim Flashner <[email protected]>
4;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
5;;; Copyright © 2020, 2021, 2022, 2025 Ricardo Wurmus <[email protected]>
6;;; Copyright © 2021 Xinglu Chen <[email protected]>
7;;; Copyright © 2021, 2026 Arun Isaac <[email protected]>
8;;; Copyright © 2025 Felix Lechner <[email protected]>
9;;; Copyright © 2025 Andreas Enge <[email protected]>
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages mes)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages cross-base)
30 #:use-module (gnu packages graphviz)
31 #:use-module (gnu packages guile)
32 #:use-module (gnu packages man)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages texinfo)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix download)
38 #:use-module (guix gexp)
39 #:use-module (guix git-download)
40 #:use-module (guix licenses)
41 #:use-module (guix packages)
42 #:use-module (guix utils))
43
44(define-public nyacc-1.08.1
45 (package
46 (name "nyacc")
47 (version "1.08.1")
48 (source (origin
49 (method url-fetch)
50 (uri (string-append "mirror://savannah/nyacc/nyacc-"
51 version ".tar.gz"))
52 (sha256
53 (base32
54 "1vrz3pnlr3njwk6ksz85slcwawi8ngiqbw94wd9x3mgv85vsfmys"))
55 (modules '((guix build utils)))
56 (snippet
57 '(substitute* "configure"
58 (("GUILE_GLOBAL_SITE=\\$prefix.*")
59 "GUILE_GLOBAL_SITE=\
60$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n")))))
61 (build-system gnu-build-system)
62 (native-inputs (list pkg-config))
63 (inputs (list guile-3.0))
64 (propagated-inputs (list guile-bytestructures))
65 (home-page "https://savannah.nongnu.org/projects/nyacc")
66 (synopsis "LALR(1) Parser Generator in Guile")
67 (description
68 "@acronym{NYACC, Not Yet Another Compiler Compiler} is set of Guile modules
69for generating parsers and lexical analyzers. It provides sample parsers,
70pretty-printers using SXML trees as an intermediate representation, a decent C
71parser and an `FFI Helper' tool to help create Guile Scheme bindings for C-based
72libraries. It also provides (partially implemented) compilers based on these
73parsers to allow execution with Guile as extension languages.")
74 (license (list gpl3+ lgpl3+))))
75
76(define-public nyacc-1.00.2
77 ;; The source of this package is used for bootstrapping in
78 ;; commencement.scm. Otherwise it could be removed.
79 (package
80 (inherit nyacc-1.08.1)
81 (version "1.00.2")
82 (source (origin
83 (method url-fetch)
84 (uri (string-append "mirror://savannah/nyacc/nyacc-"
85 version ".tar.gz"))
86 (modules '((guix build utils)))
87 (snippet
88 '(begin
89 (substitute* (find-files "." "^Makefile\\.in$")
90 (("^SITE_SCM_DIR =.*")
91 "SITE_SCM_DIR = \
92@prefix@/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
93 (("^SITE_SCM_GO_DIR =.*")
94 "SITE_SCM_GO_DIR = \
95@prefix@/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")
96 (("^INFODIR =.*")
97 "INFODIR = @prefix@/share/info\n")
98 (("^DOCDIR =.*")
99 "DOCDIR = @prefix@/share/doc/$(PACKAGE_TARNAME)\n"))
100 #t))
101 (sha256
102 (base32
103 "065ksalfllbdrzl12dz9d9dcxrv97wqxblslngsc6kajvnvlyvpk"))))
104
105 ;; XXX: Remove GUILE-BYTESTRUCTURES, an optional dependency needed to
106 ;; build the FFI helper, because it fails to build.
107 (propagated-inputs '())
108
109 (inputs (list guile-3.0))))
110
111(define-public nyacc-2.02
112 (package
113 (inherit nyacc-1.00.2)
114 (version "2.02.5")
115 (source (origin
116 (method url-fetch)
117 (uri (string-append "mirror://savannah/nyacc/nyacc-"
118 version ".tar.gz"))
119 (sha256
120 (base32
121 "0wyrq9sc9j0yp34iwzsjfpz40503psbvd982vy8kx8ym99rn5w7r"))
122 (modules '((guix build utils)))
123 (snippet
124 '(begin
125 (substitute* "configure"
126 (("GUILE_GLOBAL_SITE=\\$prefix.*")
127 "GUILE_GLOBAL_SITE=\
128$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n"))
129 (substitute* "module/Makefile.in"
130 (("@NYACC_FH_BS_BINS@") "$(NYACC_FH_BS_BINS)"))))))
131 (propagated-inputs (list guile-bytestructures))))
132
133(define-public nyacc
134 (package
135 (inherit nyacc-2.02)
136 (version "3.02.0")
137 (source (origin
138 (method url-fetch)
139 (uri (string-append "mirror://savannah/nyacc/nyacc-"
140 version ".tar.gz"))
141 (sha256
142 (base32
143 "148hljzmikl68z8jzryrdmqy9ifgz5xmid2ggdxvbyb07iawx93g"))
144 (modules '((guix build utils)))
145 (snippet
146 '(begin
147 (substitute* "configure"
148 (("GUILE_GLOBAL_SITE=\\$prefix.*")
149 "GUILE_GLOBAL_SITE=\
150$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n"))))))))
151
152(define-public mes
153 (package
154 (name "mes")
155 (version "0.27.1")
156 (source (origin
157 (method url-fetch)
158 (uri (string-append "mirror://gnu/mes/"
159 "mes-" version ".tar.gz"))
160 (sha256
161 (base32
162 "0pgjzlynfzdfq5xrxirvsrj4sdvnwq99s6xxwfhzhjga8zm40fhq"))))
163 (supported-systems '("armhf-linux" "i686-linux"
164 "x86_64-linux" "riscv64-linux"))
165 (propagated-inputs (list mescc-tools nyacc-2.02))
166 (native-inputs
167 (append (list guile-3.0)
168 (let ((target-system (or (%current-target-system)
169 (%current-system))))
170 (cond
171 ((string-prefix? "x86_64-linux" target-system)
172 ;; Use cross-compiler rather than #:system "i686-linux" to get
173 ;; MesCC 64 bit .go files installed ready for use with Guile.
174 (list (cross-binutils "i686-unknown-linux-gnu")
175 (cross-gcc "i686-unknown-linux-gnu")))
176 ((string-prefix? "aarch64-linux" target-system)
177 ;; Use cross-compiler rather than #:system "armhf-linux" to get
178 ;; MesCC 64 bit .go files installed ready for use with Guile.
179 (let ((triplet "arm-linux-gnueabihf"))
180 (list (cross-binutils triplet) (cross-gcc triplet))))
181 (else
182 '())))
183 (list graphviz help2man
184 m2-planet
185 perl ;build-aux/gitlog-to-changelog
186 texinfo)))
187 (build-system gnu-build-system)
188 (arguments
189 `(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
190 (native-search-paths
191 (list (search-path-specification
192 (variable "C_INCLUDE_PATH")
193 (files '("include")))
194 (search-path-specification
195 (variable "LIBRARY_PATH")
196 (files '("lib")))
197 (search-path-specification
198 (variable "MES_PREFIX")
199 (separator #f)
200 (files '("")))))
201 (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
202 (description
203 "GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed
204bootstrap to Guix and aims to help create full source bootstrapping for
205GNU/Linux distributions. It consists of a mutual self-hosting Scheme
206interpreter in C and a Nyacc-based C compiler in Scheme and is compatible with
207Guile.")
208 (home-page "https://www.gnu.org/software/mes/")
209 (license gpl3+)))
210
211(define-public mescc-tools
212 (package
213 (name "mescc-tools")
214 (version "1.7.0")
215 (source (origin
216 (method url-fetch)
217 (uri (string-append "mirror://savannah/" name "/"
218 name "-" version ".tar.gz"))
219 (sha256
220 (base32
221 "0p2pnvci9vglmf7zas12ay2v5gnrwafqsqqw1dfyb2bgayzzg0mn"))))
222 (build-system gnu-build-system)
223 (supported-systems '("i686-linux" "x86_64-linux"
224 "armhf-linux" "aarch64-linux"
225 "riscv64-linux"))
226 (arguments
227 (list
228 #:make-flags #~(list (string-append "PREFIX=" #$output))
229 #:test-target "test"
230 #:phases #~(modify-phases %standard-phases
231 (delete 'configure))))
232 (native-inputs (list which))
233 (synopsis "Tools for the full source bootstrapping process")
234 (description
235 "Mescc-tools is a collection of tools for use in a full source
236bootstrapping process. It consists of the M1 macro assembler, the hex2
237linker, the blood-elf symbol table generator, the kaem shell, exec_enable and
238get_machine.")
239 (home-page "https://savannah.nongnu.org/projects/mescc-tools")
240 (license gpl3+)))
241
242(define-public m2-planet
243 (package
244 (name "m2-planet")
245 (version "1.12.0")
246 (source (origin
247 (method url-fetch)
248 (uri (string-append
249 "https://github.com/oriansj/M2-Planet/releases/download/"
250 "Release_" version "/" name "-" version ".tar.gz"))
251 (sha256
252 (base32
253 "16vgad5wa5lmh6mjnkid4qn2xs7hfcfn43z9gd8iljzvsxl2i8z7"))))
254 (native-inputs (list mescc-tools))
255 (build-system gnu-build-system)
256 (supported-systems '("i686-linux" "x86_64-linux"
257 "armhf-linux" "aarch64-linux"
258 "riscv64-linux"))
259 (arguments
260 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
261 ,(string-append "CC=" (cc-for-target)))
262 #:tests? #f
263 #:phases (modify-phases %standard-phases
264 (delete 'bootstrap)
265 (delete 'configure))))
266 (synopsis "The PLAtform NEutral Transpiler")
267 (description
268 "M2-Planet, the PLAtform NEutral Transpiler, when combined with
269mescc-tools, compiles a subset of the C language into working binaries with
270introspective steps in between. It is self-hosting and for bootstrapping it
271also has an implementation in the M1 macro assembly language. M2-Planet is
272built as Phase-5 of the full source bootstrapping process and is capable of
273building GNU Mes.")
274 (home-page "https://github.com/oriansj/m2-planet")
275 (license gpl3+)))
276