gnu: python-mako: Update to 1.0.7.
[jackhill/guix/guix.git] / gnu / packages / mes.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
3 ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
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)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix licenses)
34 #:use-module (guix packages))
35
36 (define-public nyacc
37 (package
38 (name "nyacc")
39 (version "0.83.3")
40 (source (origin
41 (method url-fetch)
42 (uri (string-append "mirror://savannah/nyacc/"
43 name "-" version ".tar.gz"))
44 (file-name (string-append name "-" version ".tar.gz"))
45 (sha256
46 (base32
47 "0120n0mdb6r58c4jc024dhwqy5s8a20waknijfhqjc59a884lrd6"))))
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
59 (define-public mes
60 (let ((triplet "i686-unknown-linux-gnu"))
61 (package
62 (name "mes")
63 (version "0.13")
64 (source (origin
65 (method url-fetch)
66 (uri (string-append "https://gitlab.com/janneke/mes"
67 "/-/archive/v" version
68 "/mes-" version ".tar.gz"))
69 (sha256
70 (base32
71 "0db4f32rak839ff3n7ywkkng9672457pd2pvvgvcsyndqmmdsqw0"))))
72 (build-system gnu-build-system)
73 (supported-systems '("i686-linux" "x86_64-linux"))
74 (propagated-inputs
75 `(("mescc-tools" ,mescc-tools)
76 ("nyacc" ,nyacc)))
77 (native-inputs
78 `(("guile" ,guile-2.2)
79 ,@(if (not (string-prefix? "i686-linux" (or (%current-target-system)
80 (%current-system))))
81 ;; Use cross-compiler rather than #:system "i686-linux" to get
82 ;; MesCC 64 bit .go files installed ready for use with Guile.
83 `(("i686-linux-binutils" ,(cross-binutils triplet))
84 ("i686-linux-gcc" ,(cross-gcc triplet)))
85 '())
86 ("perl" ,perl))) ;build-aux/gitlog-to-changelog
87 (arguments
88 `(#:phases
89 (modify-phases %standard-phases
90 (add-before 'install 'generate-changelog
91 (lambda _
92 (with-output-to-file "ChangeLog"
93 (lambda ()
94 (display "Please run
95 build-aux/gitlog-to-changelog --srcdir=<git-checkout> > ChangeLog\n")))
96 #t))
97 (delete 'strip)))) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
98 (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
99 (description
100 "Mes [Maxwell Equations of Software] aims to create full source
101 bootstrapping for GuixSD. It consists of a mutual self-hosting [close to
102 Guile-] Scheme interpreter prototype in C and a Nyacc-based C compiler in
103 [Guile] Scheme.")
104 (home-page "https://gitlab.com/janneke/mes")
105 (license gpl3+))))
106
107 (define-public mescc-tools
108 (package
109 (name "mescc-tools")
110 (version "0.3")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append
114 "https://github.com/oriansj/mescc-tools/archive/Release_"
115 version
116 ".tar.gz"))
117 (file-name (string-append name "-" version ".tar.gz"))
118 (sha256
119 (base32
120 "04lvyyp7isamgddrnfpi92lgqdflzdzx5kc2x8fxmgsjisy0dgr4"))))
121 (build-system gnu-build-system)
122 (arguments
123 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
124 #:test-target "test"
125 #:phases (modify-phases %standard-phases
126 (delete 'configure))))
127 (synopsis "Tools for the full source bootstrapping process")
128 (description
129 "Mescc-tools is a collection of tools for use in a full source
130 bootstrapping process. Currently consists of the M1 macro assembler and the
131 hex2 linker.")
132 (home-page "https://github.com/oriansj/mescc-tools")
133 (license gpl3+)))