1 ;;; guix.scm -- Guix package definition
3 ;;; Mes --- Maxwell Equations of Software
4 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
6 ;;; Also borrowing code from:
7 ;;; guile-sdl2 --- FFI bindings for SDL2
8 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
11 ;;; guix.scm: This file is part of Mes.
13 ;;; Mes is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; Mes is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with Mes. If not, see <http://www.gnu.org/licenses/>.
28 ;; GNU Guix development package. To build and install, run:
30 ;; guix package -f guix.scm
32 ;; To build it, but not install it, run:
34 ;; guix build -f guix.scm
36 ;; To use as the basis for a development environment, run:
38 ;; guix environment -l guix.scm
42 (use-modules (srfi srfi-1)
49 (gnu packages commencement)
52 (gnu packages package-management)
54 (gnu packages version-control)
55 ((guix build utils) #:select (with-directory-excursion))
56 (guix build-system gnu)
57 (guix build-system trivial)
63 (define %source-dir (dirname (current-filename)))
66 (let* ((pipe (with-directory-excursion %source-dir
67 (open-pipe* OPEN_READ "git" "ls-files")))
68 (files (let loop ((lines '()))
69 (match (read-line pipe)
73 (loop (cons line lines))))))
74 (status (close-pipe pipe)))
76 (match (stat:type stat)
78 ((or 'regular 'symlink)
79 (any (cut string-suffix? <> file) files))
86 (source (local-file %source-dir #:recursive? #t #:select? git-file?))
87 (build-system gnu-build-system)
91 ("gcc" ,gcc-toolchain-4.9)
92 ("perl" ,perl))) ; build-aux/gitlog-to-changelog
93 (supported-systems '("i686-linux"))
95 `(#:system "i686-linux"
96 ;;#:make-flags '("MES_BOOTSTRAP=mes-mes")
98 (modify-phases %standard-phases
99 (add-before 'install 'generate-changelog
101 (with-output-to-file "ChangeLog"
103 (display "Please run\n build-aux/gitlog-to-changelog --srcdir=<git-checkout> > ChangeLog\n")))
105 (synopsis "Maxwell Equations of Software")
107 "Mes aims to create full source bootstrapping for GuixSD: an
108 entirely source-based bootstrap path. The target is to [have GuixSD]
109 boostrap from a minimal, easily inspectable binary --that should be
110 readable as source-- into something close to R6RS Scheme.")
111 (home-page "https://gitlab.com/janneke/mes")
114 ;; Return it here so 'guix build/environment/package' can consume it directly.