~ruther/guix-local

97031e037ebf11856ffcd4ed05478f0053ee209b — Zhu Zihao 10 months ago 7bbfe33
gnu: loko-scheme: Move to (gnu packages scheme).

* gnu/local.mk (GNU_SYSTEM_MODULES): Remove entry for 'loko.scm'.
* gnu/packages/loko.scm: Deleted.
(loko-scheme): Moved from ...
* gnu/packages/scheme.scm: ... to here.

Change-Id: I4c9d622ef890d22fce65b422f25bcf59aa0eeb3d
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
3 files changed, 70 insertions(+), 94 deletions(-)

M gnu/local.mk
D gnu/packages/loko.scm
M gnu/packages/scheme.scm
M gnu/local.mk => gnu/local.mk +0 -1
@@ 467,7 467,6 @@ GNU_SYSTEM_MODULES =				\
  %D%/packages/lout.scm				\
  %D%/packages/logging.scm			\
  %D%/packages/logo.scm				\
  %D%/packages/loko.scm				\
  %D%/packages/lsof.scm				\
  %D%/packages/lua.scm				\
  %D%/packages/luanti.scm			\

D gnu/packages/loko.scm => gnu/packages/loko.scm +0 -92
@@ 1,92 0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages loko)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages package-management)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages guile-xyz)
  #:use-module (gnu packages chez))

(define-public loko-scheme
  (package
    (name "loko-scheme")
    (version "0.12.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://gitlab.com/weinholt/loko")
             (commit (string-append "v" version))))
       (sha256
        (base32 "127cbrnpmanzd2daxd6vwdq09sqfvbm9ialpjaxd46n5j97fl5g9"))
       (file-name (git-file-name name version))))
    (build-system gnu-build-system)
    (arguments
     (list
      ;; r7rs tests are a work in progress as of 0.7.0.
      #:tests? #f
      #:strip-binaries? #f
      #:make-flags
      #~(list (string-append "PREFIX=" #$output))
      #:phases
      #~(modify-phases %standard-phases
          (delete 'configure)
          (add-before 'build 'akku-fixes
            (lambda _
              (delete-file "Akku.lock")
              (substitute* "Akku.manifest"
                (("\\(depends.*") "(depends)"))
              (invoke "akku" "install")
              (let ((dest "./.akku/lib/")
                    (source "/share/guile/site/3.0/"))
                (for-each
                 (lambda (name prefix)
                   ;; Symlink the scheme libraries so that Akku can find them
                   (symlink (string-append prefix source name)
                            (string-append dest name)))
                 '("struct" "laesare" "pfds" "machine-code")
                 (list #$(this-package-native-input "guile-struct-pack")
                       #$(this-package-native-input "guile-laesare")
                       #$(this-package-native-input "guile-pfds")
                       #$(this-package-native-input "guile-machine-code"))))
              (substitute* ".akku/env"
                (("/bin/sh") (which "sh")))
              (substitute* "scheme-wrapper"
                (("which ")
                 "command -v "))
              #t)))))
    (native-inputs
     (list akku
           chez-scheme
           guile-struct-pack
           guile-laesare
           guile-pfds
           guile-machine-code))
    (home-page "https://scheme.fail")
    (synopsis "Implementation of the algorithmic language Scheme")
    (description
     "Loko Scheme is intended to be a platform for application and operating
system development.  It is written purely in Scheme and some assembler
(i.e. no C code at the bottom).  Both the R6RS and the R7RS standards are
supported.")
    (license license:agpl3+)))

M gnu/packages/scheme.scm => gnu/packages/scheme.scm +70 -1
@@ 14,6 14,7 @@
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>


@@ 27,7 28,7 @@
;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Adam Faiz <adam.faiz@disroot.org>
;;; Copyright © 2025 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2024, 2025 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;


@@ 64,6 65,7 @@
  #:use-module (gnu packages bdw-gc)
  #:use-module (gnu packages build-tools)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages chez)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages emacs)
  #:use-module (gnu packages fontutils)


@@ 72,6 74,8 @@
  #:use-module (gnu packages gl)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages guile-xyz)
  #:use-module (gnu packages haskell-xyz)
  #:use-module (gnu packages image)
  #:use-module (gnu packages libedit)


@@ 87,6 91,7 @@
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages netpbm)
  #:use-module (gnu packages package-management)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)


@@ 1436,6 1441,70 @@ Machine.  STklos can also be compiled as a library and embedded in an
application.")
    (license license:gpl2+)))

(define-public loko-scheme
  (package
    (name "loko-scheme")
    (version "0.12.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://gitlab.com/weinholt/loko")
             (commit (string-append "v" version))))
       (sha256
        (base32 "127cbrnpmanzd2daxd6vwdq09sqfvbm9ialpjaxd46n5j97fl5g9"))
       (file-name (git-file-name name version))))
    (build-system gnu-build-system)
    (arguments
     (list
      ;; r7rs tests are a work in progress as of 0.7.0.
      #:tests? #f
      #:strip-binaries? #f
      #:make-flags
      #~(list (string-append "PREFIX=" #$output))
      #:phases
      #~(modify-phases %standard-phases
          (delete 'configure)
          (add-before 'build 'akku-fixes
            (lambda _
              (delete-file "Akku.lock")
              (substitute* "Akku.manifest"
                (("\\(depends.*") "(depends)"))
              (invoke "akku" "install")
              (let ((dest "./.akku/lib/")
                    (source "/share/guile/site/3.0/"))
                (for-each
                 (lambda (name prefix)
                   ;; Symlink the scheme libraries so that Akku can find them
                   (symlink (string-append prefix source name)
                            (string-append dest name)))
                 '("struct" "laesare" "pfds" "machine-code")
                 (list #$(this-package-native-input "guile-struct-pack")
                       #$(this-package-native-input "guile-laesare")
                       #$(this-package-native-input "guile-pfds")
                       #$(this-package-native-input "guile-machine-code"))))
              (substitute* ".akku/env"
                (("/bin/sh") (which "sh")))
              (substitute* "scheme-wrapper"
                (("which ")
                 "command -v "))
              #t)))))
    (native-inputs
     (list akku
           chez-scheme
           guile-struct-pack
           guile-laesare
           guile-pfds
           guile-machine-code))
    (home-page "https://scheme.fail")
    (synopsis "Implementation of the algorithmic language Scheme")
    (description
     "Loko Scheme is intended to be a platform for application and operating
system development.  It is written purely in Scheme and some assembler
(i.e. no C code at the bottom).  Both the R6RS and the R7RS standards are
supported.")
    (license license:agpl3+)))

(define-public r7rs-small-texinfo
  (let ((commit "38a703976ea6353e32b52a5187dbdaf77fb2f050")
        (revision "3"))