system: Add 'shadow' to %BASE-PACKAGES.
[jackhill/guix/guix.git] / gnu / packages / mes.scm
CommitLineData
1c7a78f1
JN
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages mes)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages base)
22 #:use-module (gnu packages commencement)
23 #:use-module (gnu packages cross-base)
24 #:use-module (gnu packages gcc)
25 #:use-module (gnu packages guile)
26 #:use-module (gnu packages package-management)
27 #:use-module (gnu packages perl)
28 #:use-module (guix build-system gnu)
4be01412 29 #:use-module (guix download)
1c7a78f1
JN
30 #:use-module (guix git-download)
31 #:use-module (guix licenses)
32 #:use-module (guix packages))
33
4be01412
JN
34(define-public nyacc
35 (package
36 (name "nyacc")
7182442a 37 (version "0.80.3")
4be01412
JN
38 (source (origin
39 (method url-fetch)
40 (uri (string-append "mirror://savannah/nyacc/"
41 name "-" version ".tar.gz"))
42 (sha256
43 (base32
7182442a 44 "0sdvkahnz6k9i4kf1i1ljl20220n3wk3gy6zmz0ggbbdgg4mfka0"))))
4be01412
JN
45 (build-system gnu-build-system)
46 (native-inputs
47 `(("guile" ,guile-2.2)))
48 (synopsis "LALR(1) Parser Generator in Guile")
49 (description
50 "NYACC is an LALR(1) parser generator implemented in Guile.
51The syntax and nomenclature should be considered not stable. It comes with
52extensive examples, including parsers for the Javascript and C99 languages.")
53 (home-page "https://savannah.nongnu.org/projects/nyacc")
54 (license (list gpl3+ lgpl3+))))
55
1c7a78f1 56(define-public mes
d5cb2ac7 57 (let ((commit "7fdca75d2188b28df806b34ec92627d57aafa9ae")
1c7a78f1 58 (revision "0")
e0bb0a81 59 (triplet "i686-unknown-linux-gnu")
d5cb2ac7 60 (version "0.7"))
1c7a78f1
JN
61 (package
62 (name "mes")
e0bb0a81 63 (version (string-append version "-" revision "." (string-take commit 7)))
1c7a78f1
JN
64 (source (origin
65 (method git-fetch)
66 (uri (git-reference
67 (url "https://gitlab.com/janneke/mes")
68 (commit commit)))
69 (file-name (string-append name "-" version))
1c7a78f1 70 (sha256
d5cb2ac7 71 (base32 "0fvzr1ai2rmi46zdi5b2bdjb6s8ip78mkmsk02yxl46rajmp2pb1"))))
1c7a78f1 72 (build-system gnu-build-system)
e0bb0a81
JN
73 (supported-systems '("i686-linux" "x86_64-linux"))
74 (propagated-inputs
75 `(("nyacc" ,nyacc)))
1c7a78f1
JN
76 (native-inputs
77 `(("guile" ,guile-2.2)
5afc7373
MB
78 ,@(if (string-prefix? "x86_64-linux" (or (%current-target-system)
79 (%current-system)))
e0bb0a81
JN
80 ;; Use cross-compiler rather than #:system "i686-linux" to get
81 ;; MesCC 64 bit .go files installed ready for use with Guile.
82 `(("i686-linux-binutils" ,(cross-binutils triplet))
83 ("i686-linux-gcc" ,(cross-gcc triplet)))
84 '())
85 ("perl" ,perl))) ;build-aux/gitlog-to-changelog
1c7a78f1
JN
86 (arguments
87 `(#:phases
88 (modify-phases %standard-phases
89 (add-before 'install 'generate-changelog
90 (lambda _
91 (with-output-to-file "ChangeLog"
92 (lambda ()
93 (display "Please run
94 build-aux/gitlog-to-changelog --srcdir=<git-checkout> > ChangeLog\n")))
95 #t)))))
96 (synopsis "Maxwell Equations of Software")
97 (description
98 "Mes aims to create full source bootstrapping for GuixSD. It
99consists of a mutual self-hosting [close to Guile-] Scheme interpreter
100prototype in C and a Nyacc-based C compiler in [Guile] Scheme.")
101 (home-page "https://gitlab.com/janneke/mes")
102 (license gpl3+))))