Commit | Line | Data |
---|---|---|
1c7a78f1 JN |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017 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) | |
27 | #:use-module (gnu packages guile) | |
28 | #:use-module (gnu packages package-management) | |
29 | #:use-module (gnu packages perl) | |
30 | #:use-module (guix build-system gnu) | |
4be01412 | 31 | #:use-module (guix download) |
1c7a78f1 JN |
32 | #:use-module (guix git-download) |
33 | #:use-module (guix licenses) | |
34 | #:use-module (guix packages)) | |
35 | ||
4be01412 JN |
36 | (define-public nyacc |
37 | (package | |
38 | (name "nyacc") | |
05ee5102 | 39 | (version "0.83.3") |
4be01412 JN |
40 | (source (origin |
41 | (method url-fetch) | |
42 | (uri (string-append "mirror://savannah/nyacc/" | |
43 | name "-" version ".tar.gz")) | |
238ee648 | 44 | (file-name (string-append name "-" version ".tar.gz")) |
4be01412 JN |
45 | (sha256 |
46 | (base32 | |
05ee5102 | 47 | "0120n0mdb6r58c4jc024dhwqy5s8a20waknijfhqjc59a884lrd6")))) |
4be01412 JN |
48 | (build-system gnu-build-system) |
49 | (native-inputs | |
50 | `(("guile" ,guile-2.2))) | |
51 | (synopsis "LALR(1) Parser Generator in Guile") | |
52 | (description | |
53 | "NYACC is an LALR(1) parser generator implemented in Guile. | |
54 | The syntax and nomenclature should be considered not stable. It comes with | |
55 | extensive examples, including parsers for the Javascript and C99 languages.") | |
56 | (home-page "https://savannah.nongnu.org/projects/nyacc") | |
57 | (license (list gpl3+ lgpl3+)))) | |
58 | ||
1c7a78f1 | 59 | (define-public mes |
604e494d | 60 | (let ((triplet "i686-unknown-linux-gnu")) |
1c7a78f1 JN |
61 | (package |
62 | (name "mes") | |
05c80e61 | 63 | (version "0.11") |
1c7a78f1 | 64 | (source (origin |
604e494d JN |
65 | (method url-fetch) |
66 | (uri (string-append "https://gitlab.com/janneke/mes" | |
67 | "/repository/archive.tar.gz?ref=v" | |
68 | version)) | |
69 | (file-name (string-append name "-" version ".tar.gz")) | |
1c7a78f1 | 70 | (sha256 |
604e494d | 71 | (base32 |
05c80e61 | 72 | "0m0kk7rxl8q7pjdmis36bwgv1i824nn3d7k3xxm8j64bl0gbhkmr")))) |
1c7a78f1 | 73 | (build-system gnu-build-system) |
e0bb0a81 JN |
74 | (supported-systems '("i686-linux" "x86_64-linux")) |
75 | (propagated-inputs | |
604e494d JN |
76 | `(("mescc-tools" ,mescc-tools) |
77 | ("nyacc" ,nyacc))) | |
1c7a78f1 JN |
78 | (native-inputs |
79 | `(("guile" ,guile-2.2) | |
beb7e659 EF |
80 | ,@(if (not (string-prefix? "i686-linux" (or (%current-target-system) |
81 | (%current-system)))) | |
e0bb0a81 JN |
82 | ;; Use cross-compiler rather than #:system "i686-linux" to get |
83 | ;; MesCC 64 bit .go files installed ready for use with Guile. | |
84 | `(("i686-linux-binutils" ,(cross-binutils triplet)) | |
85 | ("i686-linux-gcc" ,(cross-gcc triplet))) | |
86 | '()) | |
87 | ("perl" ,perl))) ;build-aux/gitlog-to-changelog | |
1c7a78f1 JN |
88 | (arguments |
89 | `(#:phases | |
90 | (modify-phases %standard-phases | |
91 | (add-before 'install 'generate-changelog | |
92 | (lambda _ | |
93 | (with-output-to-file "ChangeLog" | |
94 | (lambda () | |
95 | (display "Please run | |
96 | build-aux/gitlog-to-changelog --srcdir=<git-checkout> > ChangeLog\n"))) | |
0e016722 | 97 | #t)) |
05c80e61 | 98 | (delete 'strip)))) ; binutil's strip b0rkes MesCC/M1/hex2 binaries |
0e016722 | 99 | (synopsis "Scheme interpreter and C compiler for full source bootstrapping") |
1c7a78f1 | 100 | (description |
0e016722 JN |
101 | "Mes [Maxwell Equations of Software] aims to create full source |
102 | bootstrapping for GuixSD. It consists of a mutual self-hosting [close to | |
103 | Guile-] Scheme interpreter prototype in C and a Nyacc-based C compiler in | |
104 | [Guile] Scheme.") | |
1c7a78f1 JN |
105 | (home-page "https://gitlab.com/janneke/mes") |
106 | (license gpl3+)))) | |
9ae3fcb9 JN |
107 | |
108 | (define-public mescc-tools | |
109 | (package | |
110 | (name "mescc-tools") | |
8c94393c | 111 | (version "0.3") |
9ae3fcb9 JN |
112 | (source (origin |
113 | (method url-fetch) | |
114 | (uri (string-append | |
3b56776f | 115 | "https://github.com/oriansj/mescc-tools/archive/Release_" |
9ae3fcb9 JN |
116 | version |
117 | ".tar.gz")) | |
118 | (file-name (string-append name "-" version ".tar.gz")) | |
119 | (sha256 | |
120 | (base32 | |
8c94393c | 121 | "04lvyyp7isamgddrnfpi92lgqdflzdzx5kc2x8fxmgsjisy0dgr4")))) |
9ae3fcb9 | 122 | (build-system gnu-build-system) |
9ae3fcb9 JN |
123 | (arguments |
124 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
125 | #:test-target "test" | |
126 | #:phases (modify-phases %standard-phases | |
127 | (delete 'configure)))) | |
128 | (synopsis "Tools for the full source bootstrapping process") | |
129 | (description | |
130 | "Mescc-tools is a collection of tools for use in a full source | |
3b56776f | 131 | bootstrapping process. Currently consists of the M1 macro assembler and the |
9ae3fcb9 | 132 | hex2 linker.") |
3b56776f | 133 | (home-page "https://github.com/oriansj/mescc-tools") |
9ae3fcb9 | 134 | (license gpl3+))) |