diff mbox series

[bug#49889,5/5] gnu: Add gerbil-clojerbil.

Message ID 771dac2950d0b1b092a34a3332ab2162c39c0e1e.1628172101.git.public@yoctocell.xyz
State New
Headers show
Series Add build system for Gerbil Scheme | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Xinglu Chen Aug. 5, 2021, 2:10 p.m. UTC
* gnu/packages/gerbil.scm (gerbil-clojerbil): New variable.
---
 gnu/packages/gerbil.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

Comments

M Aug. 7, 2021, 4:59 p.m. UTC | #1
Xinglu Chen schreef op do 05-08-2021 om 16:10 [+0200]:
> +           (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")))))))

By wrapping the body in (when tests? ...), "--without-tests" would be supported.
The 'tests-true' linter should detect this, try "./pre-inst-env guix lint gerbil-clojerbil".

Greetings,
Maxime.
Xinglu Chen Aug. 15, 2021, 7:41 a.m. UTC | #2
On Sat, Aug 07 2021, Maxime Devos wrote:

> Xinglu Chen schreef op do 05-08-2021 om 16:10 [+0200]:
>> +           (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")))))))
>
> By wrapping the body in (when tests? ...), "--without-tests" would be supported.
> The 'tests-true' linter should detect this, try "./pre-inst-env guix
> lint gerbil-clojerbil".

Good, catch!  I will send a reroll when I get some feedback on the build
system.  :-)
diff mbox series

Patch

diff --git a/gnu/packages/gerbil.scm b/gnu/packages/gerbil.scm
index aee5da60cd..d254b39eff 100644
--- a/gnu/packages/gerbil.scm
+++ b/gnu/packages/gerbil.scm
@@ -164,3 +164,36 @@  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))))