gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / loko.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
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 loko)
20 #:use-module (guix packages)
21 #:use-module (guix git-download)
22 #:use-module (guix build-system gnu)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (gnu packages package-management)
25 #:use-module (gnu packages guile)
26 #:use-module (gnu packages guile-xyz)
27 #:use-module (gnu packages chez))
28
29 (define-public loko-scheme
30 (package
31 (name "loko-scheme")
32 (version "0.7.0")
33 (source
34 (origin
35 (method git-fetch)
36 (uri (git-reference
37 (url "https://gitlab.com/weinholt/loko")
38 (commit (string-append "v" version))))
39 (sha256
40 (base32 "1441aarw3vy14zdxyab495ag2fch04v4j89krhbqnqfkz6mdi0vy"))
41 (file-name (git-file-name name version))))
42 (build-system gnu-build-system)
43 (arguments
44 `(;; r7rs tests are a work in progress as of 0.7.0.
45 #:tests? #f
46 #:strip-binaries? #f
47 #:make-flags
48 (let ((out (assoc-ref %outputs "out")))
49 (list
50 (string-append "PREFIX=" out)
51 (string-append "GDB_AUTOLOAD_PATH=" out "/share/gdb/auto-load")))
52 #:phases
53 (modify-phases %standard-phases
54 (delete 'configure)
55 (add-before 'build 'akku-fixes
56 (lambda* (#:key inputs #:allow-other-keys)
57 (delete-file "Akku.lock")
58 (substitute* "Akku.manifest"
59 (("\\(depends.*") "(depends)"))
60 (invoke "akku" "install")
61 (let ((dest "./.akku/lib/")
62 (source "/share/guile/site/3.0/"))
63 (for-each
64 (lambda (name)
65 ;; Symlink the scheme libraries so that Akku can find them
66 (symlink (string-append (assoc-ref inputs name) source name)
67 (string-append dest name)))
68 '("struct" "laesare" "pfds" "machine-code")))
69 (substitute* ".akku/env"
70 (("/bin/sh") (which "sh")))
71 #t)))))
72 (native-inputs
73 `(("akku" ,akku)
74 ("chez-scheme" ,chez-scheme)
75 ("struct" ,guile-struct-pack)
76 ("laesare" ,guile-laesare)
77 ("pfds" ,guile-pfds)
78 ("machine-code" ,guile-machine-code)))
79 (home-page "https://scheme.fail")
80 (synopsis "Implementation of the algorithmic language Scheme")
81 (description
82 "Loko Scheme is intended to be a platform for application and operating
83 system development. It is written purely in Scheme and some assembler
84 (i.e. no C code at the bottom). Both the R6RS and the R7RS standards are
85 supported.")
86 (license license:agpl3+)))