loko.scm 3.3 KB

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