diff mbox series

[bug#51168,2/3] gnu: Add cl-libyaml

Message ID PU1PR01MB21559BD5AD7271CB2BF755C48DB69@PU1PR01MB2155.apcprd01.prod.exchangelabs.com
State New
Headers show
Series Add cl-yaml | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Foo Chuan Wei Oct. 12, 2021, 7:18 p.m. UTC
* gnu/packages/lisp-xyz.scm (sbcl-libyaml, cl-libyaml, ecl-libyaml):
  New variables.
---
 gnu/packages/lisp-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 8e26b40b5e..4395e54899 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -84,6 +84,7 @@ 
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages serialization)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tcl)
@@ -18875,3 +18876,45 @@  CDR-8 standard.")
 
 (define-public ecl-generic-comparability
   (sbcl-package->ecl-package sbcl-generic-comparability))
+
+(define-public sbcl-libyaml
+  (let ((commit "a7fe9f68bddfd00b7ca467b65b3b41b276336843")
+        (revision "1"))
+    (package
+      (name "sbcl-libyaml")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                       (url "https://github.com/eudoxia0/cl-libyaml")
+                       (commit commit)))
+                (sha256
+                  (base32
+                    "06pvmackyhq03rjmihpx6w63m6cy8wx78ll5xpwwvd85bgrqq817"))
+                (file-name (git-file-name name version))))
+      (build-system asdf-build-system/sbcl)
+      (inputs `(("cffi" ,sbcl-cffi)
+                ("libyaml" ,libyaml)))
+      (arguments '(#:asd-systems '("cl-libyaml")
+                   #:phases
+                   (modify-phases %standard-phases
+                     (add-after 'unpack 'fix-paths
+                       (lambda* (#:key inputs #:allow-other-keys)
+                         (substitute* "src/library.lisp"
+                           (("libyaml.so")
+                            (string-append (assoc-ref inputs "libyaml")
+                                           "/lib/libyaml.so")))
+                         #t)))))
+      (home-page "https://github.com/eudoxia0/cl-libyaml")
+      (synopsis "libyaml bindings for Common Lisp")
+      (description
+        "This is a home-spun binding to the libyaml library. It's not meant as
+a full library for YAML, just a bare binding with a couple of utility macros.
+For a YAML parser and emitter using this, check out cl-yaml.")
+      (license license:expat))))
+
+(define-public cl-libyaml
+  (sbcl-package->cl-source-package sbcl-libyaml))
+
+(define-public ecl-libyaml
+  (sbcl-package->ecl-package sbcl-libyaml))