summary refs log tree commit diff
path: root/gnu/packages/lisp.scm
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2019-10-06 19:34:13 +0200
committerPierre Neidhardt <mail@ambrevar.xyz>2019-10-06 19:34:13 +0200
commitcec23736d34b1050ef959daca8c1a3f4dd0c6201 (patch)
tree1bf424114e3dc0b0b28ef286894208ff5b7c64af /gnu/packages/lisp.scm
parent63b0ce391f6ea79012fac893e933e39d7a16abbd (diff)
downloadguix-cec23736d34b1050ef959daca8c1a3f4dd0c6201.tar.gz
gnu: Add cl-goject-introspection.
* gnu/packages/lisp.scm (cl-goject-introspection,
  sbcl-cl-gobject-introspection): New variables.
Diffstat (limited to 'gnu/packages/lisp.scm')
-rw-r--r--gnu/packages/lisp.scm54
1 files changed, 54 insertions, 0 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 007cdb7e0e..ed3efc7bdb 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -7434,3 +7434,57 @@ ability to store all Common Lisp data types into streams.")
 
 (define-public ecl-cl-store
   (sbcl-package->ecl-package sbcl-cl-store))
+
+(define-public sbcl-cl-gobject-introspection
+  (let ((commit "7b703e2384945ea0ac39d9b766de434a08d81560")
+        (revision "0"))
+    (package
+      (name "sbcl-cl-gobject-introspection")
+      (version (git-version "0.3" revision commit))
+      (home-page "https://github.com/andy128k/cl-gobject-introspection")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1zcqd2qj14f6b38vys8gr89s6cijsp9r8j43xa8lynilwva7bwyh"))))
+      (build-system asdf-build-system/sbcl)
+      (inputs
+       `(("alexandria" ,sbcl-alexandria)
+         ("cffi" ,sbcl-cffi)
+         ("iterate" ,sbcl-iterate)
+         ("trivial-garbage" ,sbcl-trivial-garbage)
+         ("glib" ,glib)
+         ("gobject-introspection" ,gobject-introspection)))
+      (native-inputs
+       `(("fiveam" ,sbcl-fiveam)))
+      (arguments
+       ;; TODO: Tests fail, see
+       ;; https://github.com/andy128k/cl-gobject-introspection/issues/70.
+       '(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after (quote unpack) (quote fix-paths)
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "src/init.lisp"
+                 (("libgobject-2\\.0\\.so")
+                  (string-append (assoc-ref inputs "glib") "/lib/libgobject-2.0.so"))
+                 (("libgirepository-1\\.0\\.so")
+                  (string-append (assoc-ref inputs "gobject-introspection")
+                                 "/lib/libgirepository-1.0.so")))
+               #t)))))
+      (synopsis "Common Lisp bindings to GObject Introspection")
+      (description
+       "This library is a bridge between Common Lisp and GObject
+Introspection, which enables Common Lisp programs to access the full interface
+of C+GObject libraries without the need of writing dedicated bindings.")
+      (license (list license:bsd-3
+                     ;; Tests are under a different license.
+                     license:llgpl)))))
+
+(define-public cl-gobject-introspection
+  (sbcl-package->cl-source-package sbcl-cl-gobject-introspection))