all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivana Drazovic <iv.dra@hotmail.com>
To: 62902@debbugs.gnu.org
Cc: Ivana Drazovic <iv.dra@hotmail.com>,
	Florian Pelz <pelzflorian@pelzflorian.de>
Subject: [bug#62902] [PATCH 2/3] gnu: laby: Make laby function in pure environments.
Date: Wed, 19 Apr 2023 21:53:55 +0200	[thread overview]
Message-ID: <GV2PR03MB94492FC088500D31AF64774589629@GV2PR03MB9449.eurprd03.prod.outlook.com> (raw)
In-Reply-To: <20230419195356.2418-1-iv.dra@hotmail.com>

* gnu/packages/games.scm (laby)
[build-system]: Switch to 'glib-or-gtk-build-system'.
[inputs]: Add 'gdk-pixbuf' and 'librsvg-for-system'.
[arguments]: Wrap to use SVG-enabled pixbuf loaders.cache.

Co-authored-by: Florian Pelz <pelzflorian@pelzflorian.de>
---
 gnu/packages/games.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 6a404d7712..ed06a57636 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -218,6 +218,7 @@ (define-module (gnu packages games)
   #:use-module (gnu packages xml)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
@@ -5775,9 +5776,15 @@ (define-public laby
               (base32
                "1y6nfxcjhqg9bb81hs0wijg7kcwk5kff81rgd8bsv5ps7ia9nj6b"))
              (patches (search-patches "laby-make-install.patch"))))
-    (build-system gnu-build-system)
+    (build-system glib-or-gtk-build-system)
     (inputs
-     (list lablgtk3 ocaml-lablgtk3-sourceview3 ocaml ocaml-findlib ocamlbuild))
+     (list gdk-pixbuf
+           lablgtk3
+           (librsvg-for-system)
+           ocaml-lablgtk3-sourceview3
+           ocaml
+           ocaml-findlib
+           ocamlbuild))
     (arguments
      (list #:phases
            #~(modify-phases %standard-phases
@@ -5786,7 +5793,15 @@ (define-public laby
                  (lambda* (#:key inputs #:allow-other-keys)
                    (let ((lablgtk #$(this-package-input "lablgtk")))
                      (setenv "LD_LIBRARY_PATH"
-                             (string-append lablgtk "/lib/ocaml/stublibs"))))))
+                             (string-append lablgtk "/lib/ocaml/stublibs")))))
+               (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((laby (string-append #$output "/bin/laby")))
+                      (wrap-program laby
+                        ;; Wrapping GDK_PIXBUF_MODULE_FILE allows laby to
+                        ;; function in pure environments.
+                        `("GDK_PIXBUF_MODULE_FILE" =
+                          (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
            #:tests? #f ; no 'check' target
            #:make-flags
            #~(list (string-append "PREFIX=" #$output) "all")))
-- 
2.34.1





       reply	other threads:[~2023-04-19 19:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230419195356.2418-1-iv.dra@hotmail.com>
2023-04-19 19:53 ` Ivana Drazovic [this message]
2023-04-19 19:53 ` [bug#62902] [PATCH 3/3] gnu: laby: Add patch for being able to execute game code Ivana Drazovic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=GV2PR03MB94492FC088500D31AF64774589629@GV2PR03MB9449.eurprd03.prod.outlook.com \
    --to=iv.dra@hotmail.com \
    --cc=62902@debbugs.gnu.org \
    --cc=pelzflorian@pelzflorian.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.