diff mbox series

[bug#36073,2/5] gnu: sway: Update to 1.1.1.

Message ID 87d0jmnflx.fsf@riseup.net
State Accepted
Headers show
Series None | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Meiyo Peng June 10, 2019, 6:01 a.m. UTC
Hi Tobias,

Tobias Geerinckx-Rice writes:

> Meiyo Peng wrote:
>> The author states that swaybg is now a standalone program but it should
>> be treated as a required dependency of sway.  So we should add swaybg
>> into sway's propagated-inputs.
>
> I don't quite see the connection between these two sentences…  Why propagated?

"output" is a built-in command of sway.  Lack of swaybg breaks this
command:

#+begin_src conf
  output "*" background ~/Pictures/wallpaper.jpg fill
#+end_src

I somehow forgot the Guix way to solve this problem is to hardcode the
path to /gnu/store/*-swaybg-*/bin/swaybg.  Silly me.  And thank you for
your remind.

See the new attachment.  Thanks.


--
Meiyo Peng
https://www.pengmeiyu.com/

Comments

Marius Bakke June 14, 2019, 12:10 p.m. UTC | #1
Meiyo Peng <meiyo@riseup.net> writes:

> Hi Tobias,
>
> Tobias Geerinckx-Rice writes:
>
>> Meiyo Peng wrote:
>>> The author states that swaybg is now a standalone program but it should
>>> be treated as a required dependency of sway.  So we should add swaybg
>>> into sway's propagated-inputs.
>>
>> I don't quite see the connection between these two sentences…  Why propagated?
>
> "output" is a built-in command of sway.  Lack of swaybg breaks this
> command:
>
> #+begin_src conf
>   output "*" background ~/Pictures/wallpaper.jpg fill
> #+end_src
>
> I somehow forgot the Guix way to solve this problem is to hardcode the
> path to /gnu/store/*-swaybg-*/bin/swaybg.  Silly me.  And thank you for
> your remind.
>
> See the new attachment.  Thanks.

Pushed as e23b6a68008321179508d55780f9725cf649c610, thanks!
diff mbox series

Patch

From 92ea5e8bade96f6f9a19c76de35fa54bfd2ff84f Mon Sep 17 00:00:00 2001
From: Meiyo Peng <meiyo@riseup.net>
Date: Sun, 9 Jun 2019 16:15:50 +0800
Subject: [PATCH] gnu: sway: Hardcode path to swaybg.

* gnu/packages/wm.scm (sway)[arguments]: Hardcode path to swaybg.
  [inputs]: Add swaybg.
---
 gnu/packages/wm.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index f0589e98f1..eac17e0837 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -17,7 +17,7 @@ 
 ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
-;;; Copyright © 2018 Meiyo Peng <meiyo.peng@gmail.com>
+;;; Copyright © 2018, 2019 Meiyo Peng <meiyo@riseup.net>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
 ;;;
@@ -1201,6 +1201,12 @@  modules for building a Wayland compositor.")
        (modify-phases %standard-phases
          (add-before 'configure 'hardcode-paths
            (lambda* (#:key inputs #:allow-other-keys)
+             ;; Hardcode path to swaybg.
+             (substitute* "sway/config.c"
+               (("strdup..swaybg..")
+                (string-append "strdup(\"" (assoc-ref inputs "swaybg")
+                               "/bin/swaybg\")")))
+             ;; Hardcode path to scdoc.
              (substitute* "meson.build"
                (("scdoc.get_pkgconfig_variable..scdoc..")
                 (string-append "'" (assoc-ref inputs "scdoc")
@@ -1214,6 +1220,7 @@  modules for building a Wayland compositor.")
               ("libinput" ,libinput)
               ("libxkbcommon" ,libxkbcommon)
               ("pango" ,pango)
+              ("swaybg" ,swaybg)
               ("wayland" ,wayland)
               ("wlroots" ,wlroots)))
     (native-inputs `(("git" ,git)
-- 
2.22.0