all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob d254b39eff2d8176acb7662eff46cf22fd941df9 8315 bytes (raw)
name: gnu/packages/gerbil.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; 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 gerbil)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages base)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages scheme)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages)
  #:use-module (guix build-system gerbil)
  #:use-module (guix build-system gnu)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-1))

(define-public gerbil
  (package
    (name "gerbil")
    (version "0.16")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/vyzo/gerbil")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (delete 'bootstrap)
         (add-before 'configure 'chdir
           (lambda _
             (chdir "src")))
         (replace 'configure
           (lambda* (#:key outputs inputs #:allow-other-keys)
             (invoke "chmod" "755" "-R" ".")
             ;; Otherwise fails when editing an r--r--r-- file.
             (invoke "gsi-script" "configure"
                     "--prefix" (assoc-ref outputs "out")
                     "--with-gambit" (assoc-ref inputs "gambit-c"))))
         (add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs
           (lambda _
             ;; Some .ss files refer to gxi using /usr/bin/env gxi
             ;; and 'patch-generated-file-shebangs can't fix that
             ;; because gxi has not been compiled yet.
             ;; We know where gxi is going to end up so we
             ;; Doctor Who our fix here before the problem
             ;; happens towards the end of the build.sh script.
             (let ((abs-srcdir (getcwd)))
               (for-each
                (lambda (f)
                   (substitute* f
                     (("#!/usr/bin/env gxi")
                      (string-append "#!" abs-srcdir "/../bin/gxi"))))
                 '("./gerbil/gxc"
                   "./lang/build.ss"
                   "./misc/http-perf/build.ss"
                   "./misc/rpc-perf/build.ss"
                   "./misc/scripts/docsnarf.ss"
                   "./misc/scripts/docstub.ss"
                   "./misc/scripts/docsyms.ss"
                   "./r7rs-large/build.ss"
                   "./release.ss"
                   "./std/build.ss"
                   "./std/run-tests.ss"
                   "./std/web/fastcgi-test.ss"
                   "./std/web/rack-test.ss"
                   "./tools/build.ss"
                   "./tutorial/httpd/build.ss"
                   "./tutorial/kvstore/build.ss"
                   "./tutorial/lang/build.ss"
                   "./tutorial/proxy/build-static.ss"
                   "./tutorial/proxy/build.ss")))))
         (replace
          'build
          (lambda*
           (#:key inputs #:allow-other-keys)
           (setenv "HOME" (getcwd))
             (invoke
              ;; The build script needs a tty or it'll crash on an ioctl
              ;; trying to find the width of the terminal it's running on.
              ;; Calling in script prevents that.
              "script"
              "-qefc"
              "./build.sh")))
         (delete 'check)
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (bin (string-append out "/bin"))
                    (lib (string-append out "/lib")))
               (mkdir-p bin)
               (mkdir-p lib)
               (copy-recursively "../bin" bin)
               (copy-recursively "../lib" lib)))))))
    (native-inputs
     `(("coreutils" ,coreutils)
       ("util-linux" ,util-linux)))
    (propagated-inputs
     `(("gambit-c" ,gambit-c)
       ("zlib" ,zlib)
       ("openssl" ,openssl)
       ("sqlite" ,sqlite)))
    (native-search-paths
     (list (search-path-specification
            (variable "GERBIL_LOADPATH")
            (files (list "lib/gerbil")))))
    (synopsis "Meta-dialect of Scheme with post-modern features")
    (description "Gerbil is an opinionated dialect of Scheme designed for Systems
Programming, with a state of the art macro and module system on top of the Gambit
runtime.  The macro system is based on quote-syntax, and provides the full meta-syntactic
tower with a native implementation of syntax-case.  It also provides a full-blown module
system, similar to PLT Scheme's (sorry, Racket) modules.  The main difference from Racket
is that Gerbil modules are single instantiation, supporting high performance ahead of
time compilation and compiled macros.")
    (home-page "https://cons.io")
    (license (list license:lgpl2.1 license:asl2.0))))

(define-public gerbil-srfi-54
  ;; No releases; commit from 2019-01-13.
  (let ((commit "a7db045ad3f150b5dde79c3320c34d8ac3589525")
        (revision "0"))
  (package
    (name "gerbil-srfi-54")
    (version (git-version "0.0.0" revision commit))
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/hckiang/srfi-54")
                    (commit commit)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0k1ddfhvbmf9njxm1ybs61n9kpzjvha2j63mf756r7b3x5rk51b0"))))
    (build-system gerbil-build-system)
    (home-page "https://github.com/hckiang/srfi-54")
    (synopsis "SRFI-54 for Gerbil Scheme")
    (description "This package provides SRFI-54 for Gerbil Scheme.
The implementation is exactly the same as the
@uref{https://srfi.schemers.org/srfi-54/srfi-54.html, official
reference documentation}.")
    (license license:lgpl3+))))

(define-public gerbil-clojerbil
  ;; No releases; commit from 2021-05-24
  (let ((commit "542f0d2cf0afb1d99ded76dee1f646e4d10efeb2")
        (revision "0"))
    (package
      (name "gerbil-clojerbil")
      (version (git-version "0.0.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/eraserhd/clojerbil")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1jipcmqhg9l2zi7bnbki5wky89i5xpd1ixnmyw2lm660i3p0gib4"))))
      (build-system gerbil-build-system)
      (arguments
       `(#:phases
         (modify-phases %standard-phases
           (add-after 'build 'check
             (lambda* (#:key inputs #:allow-other-keys)
               (let ((gerbil (assoc-ref inputs "gerbil")))
                 (invoke (string-append gerbil "/bin/gxi") "run-tests.ss")))))))
      (home-page "https://github.com/eraserhd/clojerbil")
      (synopsis "Thin implementation of Clojure on top of Gerbil Scheme")
      (description
       "Clojerbil is a deliberately thin implementation of Clojure on top of
Gerbil Scheme.  Its intent is to add Clojure-type niceties on top of Gerbil and
allow simple Clojure code to work without making a complicated compatibility
layer.")
      (license license:unlicense))))

debug log:

solving d254b39eff ...
found d254b39eff in https://yhetil.org/guix/771dac2950d0b1b092a34a3332ab2162c39c0e1e.1628172101.git.public@yoctocell.xyz/
found aee5da60cd in https://yhetil.org/guix/aeaee21194336c39b3300acd62bbf118278d8d33.1628172101.git.public@yoctocell.xyz/
found 90559e9ea2 in https://yhetil.org/guix/021b419a576c675a1ea40a5f4885c098478fcc48.1628172101.git.public@yoctocell.xyz/
found 69e7ae76a8 in https://yhetil.org/guix/983c3e3a6b0b63c75044e33ed4b2dad87583158f.1628172101.git.public@yoctocell.xyz/

applying [1/4] https://yhetil.org/guix/983c3e3a6b0b63c75044e33ed4b2dad87583158f.1628172101.git.public@yoctocell.xyz/
diff --git a/gnu/packages/gerbil.scm b/gnu/packages/gerbil.scm
new file mode 100644
index 0000000000..69e7ae76a8


applying [2/4] https://yhetil.org/guix/021b419a576c675a1ea40a5f4885c098478fcc48.1628172101.git.public@yoctocell.xyz/
diff --git a/gnu/packages/gerbil.scm b/gnu/packages/gerbil.scm
index 69e7ae76a8..90559e9ea2 100644


applying [3/4] https://yhetil.org/guix/aeaee21194336c39b3300acd62bbf118278d8d33.1628172101.git.public@yoctocell.xyz/
diff --git a/gnu/packages/gerbil.scm b/gnu/packages/gerbil.scm
index 90559e9ea2..aee5da60cd 100644


applying [4/4] https://yhetil.org/guix/771dac2950d0b1b092a34a3332ab2162c39c0e1e.1628172101.git.public@yoctocell.xyz/
diff --git a/gnu/packages/gerbil.scm b/gnu/packages/gerbil.scm
index aee5da60cd..d254b39eff 100644

Checking patch gnu/packages/gerbil.scm...
Applied patch gnu/packages/gerbil.scm cleanly.
Checking patch gnu/packages/gerbil.scm...
Applied patch gnu/packages/gerbil.scm cleanly.
Checking patch gnu/packages/gerbil.scm...
Applied patch gnu/packages/gerbil.scm cleanly.
Checking patch gnu/packages/gerbil.scm...
Applied patch gnu/packages/gerbil.scm cleanly.

index at:
100644 d254b39eff2d8176acb7662eff46cf22fd941df9	gnu/packages/gerbil.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.