[PATCH 0/4] Add sbcl-cl-gtk4.

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • ykonai
Owner
unassigned
Submitted by
ykonai
Severity
normal
Y
Y
ykonai wrote on 8 Aug 2023 15:47
(address . guix-patches@gnu.org)
20230808134702.1446582-1-mail@ykonai.net
Hello guix-patches,

This patch adds the Common Lisp GTK4 bindings. I tested them on SBCL x64, and
modulo the apparent dbus requirement it seems to work. ECL version of the
cl-gtk4 package is not included because I didn't manage to build it (either it
doesn't build or takes more than an hour to build on my computer (compared to
about ~10s for SBCL)).

ykonai (4):
gnu: sbcl-cl-gobject-introspection: Update to 0.3-2.c4fef07
gnu: Add sbcl-cl-gobject-introspection-wrapper.
gnu: Add sbcl-cl-glib.
gnu: Add sbcl-cl-gtk4.

gnu/packages/lisp-xyz.scm | 167 ++++++++++++++++++++++++++++++--------
1 file changed, 135 insertions(+), 32 deletions(-)


base-commit: d43b53c476b4e9322b31274b788e851d37e72302
--
2.41.0
Y
Y
ykonai wrote on 8 Aug 2023 15:52
[PATCH 1/4] gnu: sbcl-cl-gobject-introspection: Update to 0.3-2.c4fef07
(address . 65149@debbugs.gnu.org)
20230808135212.1452175-1-mail@ykonai.net
* gnu/packages/lisp.xyz (sbcl-cl-gobject-introspection): Update to 0.3-2.c4fef07
---
gnu/packages/lisp-xyz.scm | 60 ++++++++++++++++++---------------------
1 file changed, 28 insertions(+), 32 deletions(-)

Toggle diff (78 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index d2596ebc2d..0f66ba961e 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9556,43 +9556,39 @@ (define-public cl-specialization-store
(sbcl-package->cl-source-package sbcl-specialization-store))
(define-public sbcl-cl-gobject-introspection
- (let ((commit "d0136c8d9ade2560123af1fc55bbf70d2e3db539")
- (revision "1"))
+ (let ((commit "c4fef07d01cec7c830ce84ef150ed8e4da5959c4")
+ (revision "2"))
(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
- "0dz0r73pq7yhz2iq2jnkq977awx2zws2qfxdcy33329sys1ii32p"))))
- (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
- (list sbcl-fiveam))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18n4wg93sf6cjmpcpr47bg2rd8mbm9ml9lykmjsxgvsf3nwr5vnw"))))
+ (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 (list sbcl-fiveam))
(arguments
- '(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/init.lisp"
- (("libgobject-2\\.0\\.so")
- (search-input-file inputs "/lib/libgobject-2.0.so"))
- (("libgirepository-1\\.0\\.so")
- (search-input-file inputs
- "/lib/libgirepository-1.0.so"))))))))
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/init.lisp"
+ (("libgobject-2\\.0\\.so")
+ (search-input-file inputs "/lib/libgobject-2.0.so"))
+ (("libgirepository-1\\.0\\.so")
+ (search-input-file inputs
+ "/lib/libgirepository-1.0.so"))))))))
(synopsis "Common Lisp bindings to GObject Introspection")
(description
"This library is a bridge between Common Lisp and GObject
--
2.41.0
Y
Y
ykonai wrote on 8 Aug 2023 15:52
[PATCH 2/4] gnu: Add sbcl-cl-gobject-introspection-wrapper.
(address . 65149@debbugs.gnu.org)
20230808135212.1452175-2-mail@ykonai.net
* gnu/packages/lisp-xyz.scm (sbcl-cl-gobject-introspection-wrapper,
cl-gobject-introspection-wrapper, ecl-cl-gobject-introspection-wrapper): New variables.
---
gnu/packages/lisp-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 0f66ba961e..f35b363113 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9604,6 +9604,43 @@ (define-public cl-gobject-introspection
(define-public ecl-cl-gobject-introspection
(sbcl-package->ecl-package sbcl-cl-gobject-introspection))
+(define-public sbcl-cl-gobject-introspection-wrapper
+ (let ((commit "2d197cba7e7d734ac8a2e181e5e709e5b218bada")
+ (revision "1"))
+ (package
+ (name "sbcl-cl-gobject-introspection-wrapper")
+ (version (git-version "1.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://github.com/bohonghuang/cl-gobject-introspection-wrapper")
+ (commit commit)))
+ (file-name (git-file-name "cl-gobject-introspection-wrapper"
+ version))
+ (sha256
+ (base32
+ "05np2zs5806ib6qfz7d6knyaz6llxgwvjqavl1fsz5hcga40296s"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ (list sbcl-cl-ppcre
+ sbcl-alexandria
+ sbcl-cl-gobject-introspection))
+ (home-page
+ "https://github.com/bohonghuang/cl-gobject-introspection-wrapper")
+ (synopsis
+ "Wrap and call GObject Introspection FFI function in Common Lisp")
+ (description
+ "This library converts the elements from GObject Introspection into
+Common Lisp-style definitions, based on cl-gobject-introspection.")
+ (license license:lgpl3))))
+
+(define-public cl-gobject-introspection-wrapper
+ (sbcl-package->cl-source-package sbcl-cl-gobject-introspection-wrapper))
+
+(define-public ecl-cl-gobject-introspection-wrapper
+ (sbcl-package->ecl-package sbcl-cl-gobject-introspection-wrapper))
+
(define-public sbcl-cl-slug
(let ((commit "ffb229d10f0d3f7f54e706791725225e200bf749")
(revision "1"))
--
2.41.0
Y
Y
ykonai wrote on 8 Aug 2023 15:52
[PATCH 3/4] gnu: Add sbcl-cl-glib.
(address . 65149@debbugs.gnu.org)
20230808135212.1452175-3-mail@ykonai.net
* gnu/packages/lisp-xyz.scm (sbcl-cl-glib. cl-glib. ecl-cl-glib): New variables.
---
gnu/packages/lisp-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index f35b363113..58370e0c91 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9641,6 +9641,42 @@ (define-public cl-gobject-introspection-wrapper
(define-public ecl-cl-gobject-introspection-wrapper
(sbcl-package->ecl-package sbcl-cl-gobject-introspection-wrapper))
+(define-public sbcl-cl-glib
+ (let ((commit "9e52827cce1cbb3962536b6a5e628febab593f57")
+ (revision "1"))
+ (package
+ (name "sbcl-cl-glib")
+ (version (git-version "1.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bohonghuang/cl-glib")
+ (commit commit)))
+ (file-name (git-file-name "cl-glib" version))
+ (sha256
+ (base32 "0dxa493zdp1p93cahhpp3yaggn3j3kkn90mdw99g4ld7scmiglp4" ))))
+ (build-system asdf-build-system/sbcl)
+ (arguments
+ '(#:asd-systems '("cl-gio" "cl-glib" "cl-gobject")))
+ (propagated-inputs
+ (list glib))
+ (inputs
+ (list gobject-introspection
+ sbcl-cl-gobject-introspection-wrapper
+ sbcl-bordeaux-threads))
+ (home-page "https://github.com/bohonghuang/cl-glib")
+ (synopsis "Glib, GIO, Gobject bindings for Common Lisp")
+ (description "Provides Glib, GIO, Gobject bindings for Common Lisp via Gobject
+Introspection.")
+ (license license:lgpl3))))
+
+(define-public cl-glib
+ (sbcl-package->cl-source-package sbcl-cl-glib))
+
+(define-public ecl-cl-glib
+ (sbcl-package->ecl-package sbcl-cl-glib))
+
(define-public sbcl-cl-slug
(let ((commit "ffb229d10f0d3f7f54e706791725225e200bf749")
(revision "1"))
--
2.41.0
Y
Y
ykonai wrote on 8 Aug 2023 15:52
[PATCH 4/4] gnu: Add sbcl-cl-gtk4.
(address . 65149@debbugs.gnu.org)
20230808135212.1452175-4-mail@ykonai.net
* gnu/packages/lisp-xyz.scm (sbcl-cl-gtk4, cl-gtk4): New variables.
---
gnu/packages/lisp-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 58370e0c91..e35c0d6d8c 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9677,6 +9677,40 @@ (define-public cl-glib
(define-public ecl-cl-glib
(sbcl-package->ecl-package sbcl-cl-glib))
+(define-public sbcl-cl-gtk4
+ (let ((commit "d116905e7b68508d03681a50b3b24d63e7b111e4")
+ (revision "1"))
+ (package
+ (name "sbcl-cl-gtk4")
+ (version (git-version "1.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bohonghuang/cl-gtk4")
+ (commit commit)))
+ (file-name (git-file-name "cl-gtk4" version))
+ (sha256
+ (base32
+ "0mprmmvbagnflvhynn51l42nbwr08rld99ls0c48m5lpjn0ja4zc"))))
+ (build-system asdf-build-system/sbcl)
+ (arguments
+ '(#:asd-systems '("cl-gtk4" "cl-gdk4")))
+ ;; propagate because it at least requires the typelib files at runtime
+ (propagated-inputs (list gtk))
+ (inputs
+ (list gobject-introspection
+ sbcl-cl-glib
+ sbcl-cl-gobject-introspection-wrapper))
+ (home-page "https://github.com/bohonghuang/cl-gtk4")
+ (synopsis "GTK4 bindings for Common Lisp")
+ (description
+ "Provides GTK4 bindings for Common Lisp via Gobject Introspection, in the
+cl-gtk4 ASDF system.")
+ (license license:lgpl3))))
+
+(define-public cl-gtk4
+ (sbcl-package->cl-source-package sbcl-cl-gtk4))
+
(define-public sbcl-cl-slug
(let ((commit "ffb229d10f0d3f7f54e706791725225e200bf749")
(revision "1"))
--
2.41.0
G
G
Guillaume Le Vaillant wrote on 10 Aug 2023 14:00
(name . ykonai)(address . mail@ykonai.net)(address . 65149@debbugs.gnu.org)
871qgbksnb.fsf@kitej
ykonai via Guix-patches via <guix-patches@gnu.org> skribis:

Toggle quote (10 lines)
> * gnu/packages/lisp-xyz.scm (sbcl-cl-gtk4, cl-gtk4): New variables.
> [...]
> + ;; propagate because it at least requires the typelib files at runtime
> + (propagated-inputs (list gtk))
> + (inputs
> + (list gobject-introspection
> + sbcl-cl-glib
> + sbcl-cl-gobject-introspection-wrapper))
> [...]

Hi.
Instead of propagating Gtk, have your checked if having the
GI_TYPELIB_PATH environment variable set at runtime could be enough to
make things work?
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCZNTS+A8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j/BMAD+MNrC0WqS59yIB/9+Lat9ZCVLeUxzhvdVtu5k
NoYj9p8A/ixXwhpusk4MvZI6CQil4i6DSpIiYr67UfPOKqYLGSEu
=rlVH
-----END PGP SIGNATURE-----

Y
Y
ykonai wrote on 11 Aug 2023 00:15
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 65149@debbugs.gnu.org)
85cyzuy26d.fsf@ykonai.net
Guillaume Le Vaillant <glv@posteo.net> writes:
Toggle quote (5 lines)
> Instead of propagating Gtk, have your checked if having the
> GI_TYPELIB_PATH environment variable set at runtime could be enough to
> make things work?


That does look like it works. I assume the best way would be to set the
search-paths of the package (which unfortunately seems to involve
copying the typelib files)?

I'll try to send a v2 patch once I get it to work.
Y
Y
ykonai wrote on 15 Aug 2023 21:49
[PATCH v2 1/4] gnu: sbcl-cl-gobject-introspection: Update to 0.3-2.c4fef07
(address . 65149@debbugs.gnu.org)
20230815194939.1180103-1-mail@ykonai.net
* gnu/packages/lisp.xyz (sbcl-cl-gobject-introspection): Update to 0.3-2.c4fef07
---
gnu/packages/lisp-xyz.scm | 60 ++++++++++++++++++---------------------
1 file changed, 28 insertions(+), 32 deletions(-)

Toggle diff (80 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index d2596ebc2d..0f66ba961e 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9556,43 +9556,39 @@ (define-public cl-specialization-store
(sbcl-package->cl-source-package sbcl-specialization-store))
(define-public sbcl-cl-gobject-introspection
- (let ((commit "d0136c8d9ade2560123af1fc55bbf70d2e3db539")
- (revision "1"))
+ (let ((commit "c4fef07d01cec7c830ce84ef150ed8e4da5959c4")
+ (revision "2"))
(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
- "0dz0r73pq7yhz2iq2jnkq977awx2zws2qfxdcy33329sys1ii32p"))))
- (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
- (list sbcl-fiveam))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18n4wg93sf6cjmpcpr47bg2rd8mbm9ml9lykmjsxgvsf3nwr5vnw"))))
+ (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 (list sbcl-fiveam))
(arguments
- '(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/init.lisp"
- (("libgobject-2\\.0\\.so")
- (search-input-file inputs "/lib/libgobject-2.0.so"))
- (("libgirepository-1\\.0\\.so")
- (search-input-file inputs
- "/lib/libgirepository-1.0.so"))))))))
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/init.lisp"
+ (("libgobject-2\\.0\\.so")
+ (search-input-file inputs "/lib/libgobject-2.0.so"))
+ (("libgirepository-1\\.0\\.so")
+ (search-input-file inputs
+ "/lib/libgirepository-1.0.so"))))))))
(synopsis "Common Lisp bindings to GObject Introspection")
(description
"This library is a bridge between Common Lisp and GObject

base-commit: d43b53c476b4e9322b31274b788e851d37e72302
--
2.41.0
Y
Y
ykonai wrote on 15 Aug 2023 21:49
[PATCH v2 2/4] gnu: Add sbcl-cl-gobject-introspection-wrapper.
(address . 65149@debbugs.gnu.org)
20230815194939.1180103-2-mail@ykonai.net
* gnu/packages/lisp-xyz.scm (sbcl-cl-gobject-introspection-wrapper,
cl-gobject-introspection-wrapper, ecl-cl-gobject-introspection-wrapper): New variables.
---
gnu/packages/lisp-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 0f66ba961e..f35b363113 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9604,6 +9604,43 @@ (define-public cl-gobject-introspection
(define-public ecl-cl-gobject-introspection
(sbcl-package->ecl-package sbcl-cl-gobject-introspection))
+(define-public sbcl-cl-gobject-introspection-wrapper
+ (let ((commit "2d197cba7e7d734ac8a2e181e5e709e5b218bada")
+ (revision "1"))
+ (package
+ (name "sbcl-cl-gobject-introspection-wrapper")
+ (version (git-version "1.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://github.com/bohonghuang/cl-gobject-introspection-wrapper")
+ (commit commit)))
+ (file-name (git-file-name "cl-gobject-introspection-wrapper"
+ version))
+ (sha256
+ (base32
+ "05np2zs5806ib6qfz7d6knyaz6llxgwvjqavl1fsz5hcga40296s"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ (list sbcl-cl-ppcre
+ sbcl-alexandria
+ sbcl-cl-gobject-introspection))
+ (home-page
+ "https://github.com/bohonghuang/cl-gobject-introspection-wrapper")
+ (synopsis
+ "Wrap and call GObject Introspection FFI function in Common Lisp")
+ (description
+ "This library converts the elements from GObject Introspection into
+Common Lisp-style definitions, based on cl-gobject-introspection.")
+ (license license:lgpl3))))
+
+(define-public cl-gobject-introspection-wrapper
+ (sbcl-package->cl-source-package sbcl-cl-gobject-introspection-wrapper))
+
+(define-public ecl-cl-gobject-introspection-wrapper
+ (sbcl-package->ecl-package sbcl-cl-gobject-introspection-wrapper))
+
(define-public sbcl-cl-slug
(let ((commit "ffb229d10f0d3f7f54e706791725225e200bf749")
(revision "1"))
--
2.41.0
Y
Y
ykonai wrote on 15 Aug 2023 21:49
[PATCH v2 3/4] gnu: Add sbcl-cl-glib.
(address . 65149@debbugs.gnu.org)
20230815194939.1180103-3-mail@ykonai.net
* gnu/packages/lisp-xyz.scm (sbcl-cl-glib, cl-glib, ecl-cl-glib): New variables.
---
gnu/packages/lisp-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index f35b363113..2a47a21b65 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9641,6 +9641,42 @@ (define-public cl-gobject-introspection-wrapper
(define-public ecl-cl-gobject-introspection-wrapper
(sbcl-package->ecl-package sbcl-cl-gobject-introspection-wrapper))
+(define-public sbcl-cl-glib
+ (let ((commit "9e52827cce1cbb3962536b6a5e628febab593f57")
+ (revision "1"))
+ (package
+ (name "sbcl-cl-glib")
+ (version (git-version "1.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bohonghuang/cl-glib")
+ (commit commit)))
+ (file-name (git-file-name "cl-glib" version))
+ (sha256
+ (base32 "0dxa493zdp1p93cahhpp3yaggn3j3kkn90mdw99g4ld7scmiglp4" ))))
+ (build-system asdf-build-system/sbcl)
+ (arguments
+ '(#:asd-systems '("cl-gio" "cl-glib" "cl-gobject")))
+ (inputs
+ (list
+ glib
+ gobject-introspection
+ sbcl-cl-gobject-introspection-wrapper
+ sbcl-bordeaux-threads))
+ (home-page "https://github.com/bohonghuang/cl-glib")
+ (synopsis "Glib, GIO, Gobject bindings for Common Lisp")
+ (description "Provides Glib, GIO, Gobject bindings for Common Lisp via Gobject
+Introspection.")
+ (license license:lgpl3))))
+
+(define-public cl-glib
+ (sbcl-package->cl-source-package sbcl-cl-glib))
+
+(define-public ecl-cl-glib
+ (sbcl-package->ecl-package sbcl-cl-glib))
+
(define-public sbcl-cl-slug
(let ((commit "ffb229d10f0d3f7f54e706791725225e200bf749")
(revision "1"))
--
2.41.0
Y
Y
ykonai wrote on 15 Aug 2023 21:49
[PATCH v2 4/4] gnu: Add sbcl-cl-gtk4.
(address . 65149@debbugs.gnu.org)
20230815194939.1180103-4-mail@ykonai.net
* gnu/packages/lisp-xyz.scm (sbcl-cl-gtk4, cl-gtk4): New variables.
---
gnu/packages/lisp-xyz.scm | 57 +++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)

Toggle diff (70 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 2a47a21b65..a13363f69a 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9677,6 +9677,63 @@ (define-public cl-glib
(define-public ecl-cl-glib
(sbcl-package->ecl-package sbcl-cl-glib))
+(define-public sbcl-cl-gtk4
+ (let ((commit "d116905e7b68508d03681a50b3b24d63e7b111e4")
+ (revision "1"))
+ (package
+ (name "sbcl-cl-gtk4")
+ (version (git-version "1.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bohonghuang/cl-gtk4")
+ (commit commit)))
+ (file-name (git-file-name "cl-gtk4" version))
+ (sha256
+ (base32 "0mprmmvbagnflvhynn51l42nbwr08rld99ls0c48m5lpjn0ja4zc"))))
+ (build-system asdf-build-system/sbcl)
+ (arguments
+ '(#:asd-systems '("cl-gtk4" "cl-gdk4")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'copy-typelibs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (dirs
+ (list (assoc-ref inputs "gtk")
+ (assoc-ref inputs "graphene")
+ (assoc-ref inputs "harfbuzz")
+ (assoc-ref inputs "pango")
+ (assoc-ref inputs "gdk-pixbuf"))))
+ (map
+ (lambda (d)
+ (copy-recursively
+ (string-append d "/lib/girepository-1.0")
+ (string-append out "/lib/girepository-1.0")))
+ dirs)))))))
+ (native-inputs
+ (list graphene pango harfbuzz gdk-pixbuf))
+ (inputs
+ (list
+ gtk
+ gobject-introspection
+ sbcl-cl-glib
+ sbcl-cl-gobject-introspection-wrapper))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GI_TYPELIB_PATH")
+ (separator ":")
+ (files (list "lib/girepository-1.0")))))
+ (home-page "https://github.com/bohonghuang/cl-gtk4")
+ (synopsis "GTK4 bindings for Common Lisp.")
+ (description "Provides GTK4 bindings for Common Lisp via Gobject Introspection, in the
+cl-gtk4 ASDF system.")
+ (license license:lgpl3))))
+
+(define-public cl-gtk4
+ (sbcl-package->cl-source-package sbcl-cl-gtk4))
+
(define-public sbcl-cl-slug
(let ((commit "ffb229d10f0d3f7f54e706791725225e200bf749")
(revision "1"))
--
2.41.0
G
G
Guillaume Le Vaillant wrote on 18 Aug 2023 13:46
Re: [bug#65149] [PATCH 0/4] Add sbcl-cl-gtk4.
(name . ykonai)(address . mail@ykonai.net)(address . 65149-done@debbugs.gnu.org)
874jkw7ee5.fsf@kitej
Patches applied as cb948aef0caae7e9f3b61c57aa06a73be04a5868 and
following with a few minor fixes.

For cl-gtk4, I used the patch propagating gtk instead of the patch
copying files from several gtk-related libraries (it will probably be
easier to maintain). If one day we have a package with a standalone
binary depending on cl-gtk4, we will just have not to forget to wrap it
so that it can find GI_TYPELIB_PATH (e.g. like for gnome-music, sushi,
gnome-characters, etc).

Thanks.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCZN9cYg8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+8OwD/YhGBNiHmOkYfA0nuL37jdnGbVj2f2IYts1Mz
UkU44oIBAKKtZQWnddwLzkknAiQatV5nAyOm7YpOcyYCsT6v20yG
=jst3
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 65149@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 65149
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch