Commit | Line | Data |
---|---|---|
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) | |
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) | |
00c86a88 | 31 | #:use-module (gnu packages texinfo) |
1c7a78f1 | 32 | #:use-module (guix build-system gnu) |
4be01412 | 33 | #:use-module (guix download) |
1c7a78f1 JN |
34 | #:use-module (guix git-download) |
35 | #:use-module (guix licenses) | |
36 | #:use-module (guix packages)) | |
37 | ||
4be01412 JN |
38 | (define-public nyacc |
39 | (package | |
40 | (name "nyacc") | |
445ecce9 | 41 | (version "0.86.0") |
4be01412 JN |
42 | (source (origin |
43 | (method url-fetch) | |
44 | (uri (string-append "mirror://savannah/nyacc/" | |
45 | name "-" version ".tar.gz")) | |
445ecce9 | 46 | (patches (search-patches "nyacc-binary-literals.patch")) |
4be01412 JN |
47 | (sha256 |
48 | (base32 | |
445ecce9 | 49 | "0lkd9lyspvhxlfs0496gsllwinh62jk9wij6gpadvx9gwz6yavd9")))) |
4be01412 JN |
50 | (build-system gnu-build-system) |
51 | (native-inputs | |
52 | `(("guile" ,guile-2.2))) | |
53 | (synopsis "LALR(1) Parser Generator in Guile") | |
54 | (description | |
55 | "NYACC is an LALR(1) parser generator implemented in Guile. | |
56 | The syntax and nomenclature should be considered not stable. It comes with | |
57 | extensive examples, including parsers for the Javascript and C99 languages.") | |
58 | (home-page "https://savannah.nongnu.org/projects/nyacc") | |
59 | (license (list gpl3+ lgpl3+)))) | |
60 | ||
1c7a78f1 | 61 | (define-public mes |
f266199d JN |
62 | (let ((triplet "i686-unknown-linux-gnu") |
63 | (version "0.18") | |
64 | (revision "0") | |
65 | (commit "08f04f559670d9e8f57eb03bb9b13f4d0b81cedf")) | |
1c7a78f1 JN |
66 | (package |
67 | (name "mes") | |
f266199d | 68 | (version (string-append version "-" revision "." (string-take commit 7))) |
1c7a78f1 | 69 | (source (origin |
604e494d | 70 | (method url-fetch) |
f266199d JN |
71 | (uri (string-append |
72 | "https://git.savannah.gnu.org/cgit/mes.git/snapshot/" | |
73 | name "-" commit | |
74 | ".tar.gz")) | |
1c7a78f1 | 75 | (sha256 |
604e494d | 76 | (base32 |
f266199d | 77 | "1b7wz9k38pfrz707pd4p8s54q903jr167q73ya7qkna89sxj3wna")))) |
1c7a78f1 | 78 | (build-system gnu-build-system) |
e0bb0a81 JN |
79 | (supported-systems '("i686-linux" "x86_64-linux")) |
80 | (propagated-inputs | |
604e494d | 81 | `(("mescc-tools" ,mescc-tools) |
c665774a | 82 | ("nyacc" ,nyacc))) |
1c7a78f1 JN |
83 | (native-inputs |
84 | `(("guile" ,guile-2.2) | |
beb7e659 EF |
85 | ,@(if (not (string-prefix? "i686-linux" (or (%current-target-system) |
86 | (%current-system)))) | |
e0bb0a81 JN |
87 | ;; Use cross-compiler rather than #:system "i686-linux" to get |
88 | ;; MesCC 64 bit .go files installed ready for use with Guile. | |
89 | `(("i686-linux-binutils" ,(cross-binutils triplet)) | |
90 | ("i686-linux-gcc" ,(cross-gcc triplet))) | |
91 | '()) | |
256d5c6e | 92 | ("graphviz" ,graphviz) |
00c86a88 | 93 | ("help2man" ,help2man) |
256d5c6e | 94 | ("perl" ,perl) ; build-aux/gitlog-to-changelog |
00c86a88 | 95 | ("texinfo" ,texinfo))) |
1c7a78f1 | 96 | (arguments |
256d5c6e | 97 | `(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries |
0e016722 | 98 | (synopsis "Scheme interpreter and C compiler for full source bootstrapping") |
1c7a78f1 | 99 | (description |
f266199d JN |
100 | "GNU Mes--Maxwell Equations of Software--brings the Reduced |
101 | Binary Seed bootstrap to GuixSD and aims to help create full source | |
102 | bootstrapping for GNU/Linux distributions. It consists of a mutual | |
103 | self-hosting Scheme interpreter in C and a Nyacc-based C compiler in | |
104 | Scheme and is compatible with Guile.") | |
256d5c6e | 105 | (home-page "https://gnu.org/software/mes") |
1c7a78f1 | 106 | (license gpl3+)))) |
9ae3fcb9 JN |
107 | |
108 | (define-public mescc-tools | |
109 | (package | |
110 | (name "mescc-tools") | |
8a502c3b | 111 | (version "0.5.2") |
9ae3fcb9 JN |
112 | (source (origin |
113 | (method url-fetch) | |
114 | (uri (string-append | |
8a502c3b JN |
115 | "http://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/" |
116 | name "-Release_" version | |
9ae3fcb9 JN |
117 | ".tar.gz")) |
118 | (file-name (string-append name "-" version ".tar.gz")) | |
119 | (sha256 | |
120 | (base32 | |
8a502c3b | 121 | "01x7bhmgwyf6mc2g1hcvibhps98nllacqm4f0j5l51b1mbi18pc2")))) |
9ae3fcb9 | 122 | (build-system gnu-build-system) |
0b689430 | 123 | (supported-systems '("i686-linux" "x86_64-linux")) |
9ae3fcb9 JN |
124 | (arguments |
125 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
126 | #:test-target "test" | |
127 | #:phases (modify-phases %standard-phases | |
8a502c3b | 128 | (delete 'configure)))) |
9ae3fcb9 JN |
129 | (synopsis "Tools for the full source bootstrapping process") |
130 | (description | |
131 | "Mescc-tools is a collection of tools for use in a full source | |
8a502c3b JN |
132 | bootstrapping process. It consists of the M1 macro assembler, the hex2 |
133 | linker, the blood-elf symbol table generator, the kaem shell, exec_enable and | |
134 | get_machine.") | |
135 | (home-page "https://savannah.nongnu.org/projects/mescc-tools") | |
9ae3fcb9 | 136 | (license gpl3+))) |