Commit | Line | Data |
---|---|---|
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) | |
29 | #:use-module (guix git-download) | |
30 | #:use-module (guix licenses) | |
31 | #:use-module (guix packages)) | |
32 | ||
33 | (define-public mes | |
34 | (let ((commit "a437c173b9da1949ad966fd50dd4f26e522a910a") | |
35 | (revision "0") | |
36 | (triplet "i686-unknown-linux-gnu")) | |
37 | (package | |
38 | (name "mes") | |
39 | (version (string-append "0.5-" revision "." (string-take commit 7))) | |
40 | (source (origin | |
41 | (method git-fetch) | |
42 | (uri (git-reference | |
43 | (url "https://gitlab.com/janneke/mes") | |
44 | (commit commit))) | |
45 | (file-name (string-append name "-" version)) | |
46 | ;; TODO: Unbundle nyacc. | |
47 | (sha256 | |
48 | (base32 "1ynr0hc0k15307sgzv09k3y5rvy46h0wbh7zcblx1f9v7y8k90zv")))) | |
49 | (build-system gnu-build-system) | |
50 | (supported-systems '("x86_64-linux")) | |
51 | (native-inputs | |
52 | `(("guile" ,guile-2.2) | |
53 | ;; Use cross-compiler rather than #:system "i686-linux" to get | |
54 | ;; MesCC 64 bit .go files installed ready for use with Guile. | |
55 | ("i686-linux-binutils" ,(cross-binutils triplet)) | |
56 | ("i686-linux-gcc" ,(let ((triplet triplet)) (cross-gcc triplet))) | |
57 | ("perl" ,perl))) ;build-aux/gitlog-to-changelog | |
58 | (arguments | |
59 | `(#:phases | |
60 | (modify-phases %standard-phases | |
61 | (add-before 'install 'generate-changelog | |
62 | (lambda _ | |
63 | (with-output-to-file "ChangeLog" | |
64 | (lambda () | |
65 | (display "Please run | |
66 | build-aux/gitlog-to-changelog --srcdir=<git-checkout> > ChangeLog\n"))) | |
67 | #t))))) | |
68 | (synopsis "Maxwell Equations of Software") | |
69 | (description | |
70 | "Mes aims to create full source bootstrapping for GuixSD. It | |
71 | consists of a mutual self-hosting [close to Guile-] Scheme interpreter | |
72 | prototype in C and a Nyacc-based C compiler in [Guile] Scheme.") | |
73 | (home-page "https://gitlab.com/janneke/mes") | |
74 | (license gpl3+)))) |