gnu: shadow: Return #t from all phases.
[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>
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.
54The syntax and nomenclature should be considered not stable. It comes with
55extensive 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")
5559e01f 63 (version "0.13")
1c7a78f1 64 (source (origin
604e494d
JN
65 (method url-fetch)
66 (uri (string-append "https://gitlab.com/janneke/mes"
5559e01f
JN
67 "/-/archive/v" version
68 "/mes-" version ".tar.gz"))
1c7a78f1 69 (sha256
604e494d 70 (base32
5559e01f 71 "0db4f32rak839ff3n7ywkkng9672457pd2pvvgvcsyndqmmdsqw0"))))
1c7a78f1 72 (build-system gnu-build-system)
e0bb0a81
JN
73 (supported-systems '("i686-linux" "x86_64-linux"))
74 (propagated-inputs
604e494d
JN
75 `(("mescc-tools" ,mescc-tools)
76 ("nyacc" ,nyacc)))
1c7a78f1
JN
77 (native-inputs
78 `(("guile" ,guile-2.2)
beb7e659
EF
79 ,@(if (not (string-prefix? "i686-linux" (or (%current-target-system)
80 (%current-system))))
e0bb0a81
JN
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
1c7a78f1
JN
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")))
0e016722 96 #t))
05c80e61 97 (delete 'strip)))) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
0e016722 98 (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
1c7a78f1 99 (description
0e016722
JN
100 "Mes [Maxwell Equations of Software] aims to create full source
101bootstrapping for GuixSD. It consists of a mutual self-hosting [close to
102Guile-] Scheme interpreter prototype in C and a Nyacc-based C compiler in
103[Guile] Scheme.")
1c7a78f1
JN
104 (home-page "https://gitlab.com/janneke/mes")
105 (license gpl3+))))
9ae3fcb9
JN
106
107(define-public mescc-tools
108 (package
109 (name "mescc-tools")
8c94393c 110 (version "0.3")
9ae3fcb9
JN
111 (source (origin
112 (method url-fetch)
113 (uri (string-append
3b56776f 114 "https://github.com/oriansj/mescc-tools/archive/Release_"
9ae3fcb9
JN
115 version
116 ".tar.gz"))
117 (file-name (string-append name "-" version ".tar.gz"))
118 (sha256
119 (base32
8c94393c 120 "04lvyyp7isamgddrnfpi92lgqdflzdzx5kc2x8fxmgsjisy0dgr4"))))
9ae3fcb9 121 (build-system gnu-build-system)
9ae3fcb9
JN
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
3b56776f 130bootstrapping process. Currently consists of the M1 macro assembler and the
9ae3fcb9 131hex2 linker.")
3b56776f 132 (home-page "https://github.com/oriansj/mescc-tools")
9ae3fcb9 133 (license gpl3+)))