diff mbox series

[bug#66601] (@ (gnu packages wm) wlroots): expose "protocol" dir

Message ID CAGJuR-4LvL-Hpb7OuHZWuiLEOjEOptkEAty2XUoMjrTYWqJdjw@mail.gmail.com
State New
Headers show
Series [bug#66601] (@ (gnu packages wm) wlroots): expose "protocol" dir | expand

Commit Message

Grigory Shepelev Oct. 18, 2023, 5:01 a.m. UTC
Hi

I needed to tweak something in Sway and could not find its xml wayland
protocol files. It was hidden in the package source. Exposed them to the
build.

Comments

Grigory Shepelev Oct. 18, 2023, 6:24 a.m. UTC | #1
Sorry, it has to be "add-before 'configure"

ср, 18 окт. 2023 г. в 08:02, GNU bug Tracking System <help-debbugs@gnu.org>:

> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  guix-patches@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 66601@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 66601: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66601
> GNU Bug Tracking System
> Contact help-debbugs@gnu.org with problems
>
Ludovic Courtès Nov. 22, 2023, 2:43 p.m. UTC | #2
Hi Grigory,

Grigory Shepelev <shegeley@gmail.com> skribis:

> I needed to tweak something in Sway and could not find its xml wayland
> protocol files. It was hidden in the package source. Exposed them to the
> build.
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 8576d0297d..45ef9cb073 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -1648,7 +1648,15 @@ (define-public wlroots
>               (substitute* "backend/drm/meson.build"
>                 (("/usr/share/hwdata/pnp.ids")
>                  (string-append (assoc-ref (or native-inputs inputs) "hwdata")
> -                               "/share/hwdata/pnp.ids"))))))))
> +                               "/share/hwdata/pnp.ids")))))
> +         (add-after 'install 'copy-protocols
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (mkdir-p "protocols")
> +             (copy-recursively
> +              "protocol" ;; why singular?!
> +              (string-append (assoc-ref outputs "out")
> +                             "/protocols"))

/protocol(s) is a non-standard directory (should it be
/share/sway/protocols?).

Also, it seems to me that this kind of change belongs upstream.  Could
you check why it’s not there and/or how other distros deal with it?

Thanks,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 8576d0297d..45ef9cb073 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1648,7 +1648,15 @@  (define-public wlroots
              (substitute* "backend/drm/meson.build"
                (("/usr/share/hwdata/pnp.ids")
                 (string-append (assoc-ref (or native-inputs inputs) "hwdata")
-                               "/share/hwdata/pnp.ids"))))))))
+                               "/share/hwdata/pnp.ids")))))
+         (add-after 'install 'copy-protocols
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (mkdir-p "protocols")
+             (copy-recursively
+              "protocol" ;; why singular?!
+              (string-append (assoc-ref outputs "out")
+                             "/protocols"))
+             #t)))))
     (propagated-inputs
      (list ;; As required by wlroots.pc.
            eudev