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>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
42 (uri (string-append "mirror://savannah/nyacc/"
43 name "-" version ".tar.gz"))
44 (file-name (string-append name "-" version ".tar.gz"))
47 "0120n0mdb6r58c4jc024dhwqy5s8a20waknijfhqjc59a884lrd6"))))
48 (build-system gnu-build-system)
50 `(("guile" ,guile-2.2)))
51 (synopsis "LALR(1) Parser Generator in Guile")
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+))))
60 (let ((triplet "i686-unknown-linux-gnu"))
66 (uri (string-append "https://gitlab.com/janneke/mes"
67 "/-/archive/v" version
68 "/mes-" version ".tar.gz"))
71 "0db4f32rak839ff3n7ywkkng9672457pd2pvvgvcsyndqmmdsqw0"))))
72 (build-system gnu-build-system)
73 (supported-systems '("i686-linux" "x86_64-linux"))
75 `(("mescc-tools" ,mescc-tools)
78 `(("guile" ,guile-2.2)
79 ,@(if (not (string-prefix? "i686-linux" (or (%current-target-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)))
86 ("perl" ,perl))) ;build-aux/gitlog-to-changelog
89 (modify-phases %standard-phases
90 (add-before 'install 'generate-changelog
92 (with-output-to-file "ChangeLog"
95 build-aux/gitlog-to-changelog --srcdir=<git-checkout> > ChangeLog\n")))
97 (delete 'strip)))) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
98 (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
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
104 (home-page "https://gitlab.com/janneke/mes")
107 (define-public mescc-tools
114 "https://github.com/oriansj/mescc-tools/archive/Release_"
117 (file-name (string-append name "-" version ".tar.gz"))
120 "04lvyyp7isamgddrnfpi92lgqdflzdzx5kc2x8fxmgsjisy0dgr4"))))
121 (build-system gnu-build-system)
123 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
125 #:phases (modify-phases %standard-phases
126 (delete 'configure))))
127 (synopsis "Tools for the full source bootstrapping process")
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
132 (home-page "https://github.com/oriansj/mescc-tools")