diff mbox series

[bug#50084] gnu: Add waypipe.

Message ID 20210830015400.244302-1-contact@robbyzambito.me
State Accepted
Headers show
Series [bug#50084] gnu: Add waypipe. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Robby Zambito Aug. 30, 2021, 1:54 a.m. UTC
* gnu/packages/freedesktop.scm (waypipe): New variable.
---
 gnu/packages/freedesktop.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Comments

Robby Zambito Aug. 30, 2021, 1:58 a.m. UTC | #1
I apologize for being messy with this patch. I realized after poking
around more that this package would probably fit better under the
freedesktop module. My most recent patch should be able to be applied
without any of the previous ones I sent. I hope this is good now!

Thanks,
Robby
Nicolas Goaziou Sept. 6, 2021, 9:15 a.m. UTC | #2
Hello,

Robby Zambito <contact@robbyzambito.me> writes:

> * gnu/packages/freedesktop.scm (waypipe): New variable.

Applied. Thank you.

Regards,
M Sept. 7, 2021, 9:13 p.m. UTC | #3
Hi,

> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'fix-sleep-path
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (let ((coreutils (assoc-ref inputs "coreutils")))

coreutils is in native-inputs, not inputs, so this needs to be:
(assoc-ref (or native-inputs inputs) "coreutils").  (native-inputs
and inputs are appended together when compiling natively, that's
why this didn't cause a build error).

> +               (substitute* "./test/startup_failure.py"
> +                 (("sleep") (string-append coreutils "/bin/sleep")))))))))

You can write (("sleep") (which "sleep")) here.

> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)
> +       ("scdoc" ,scdoc)
> +       ;; For tests
> +       ("python" ,python)
> +       ("coreutils" ,coreutils)))

FWIW, coreutils is an implicit native-input of meson-build-system,
so this input isn't necessary.

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 693a79c738..f2e00ebba9 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -24,6 +24,7 @@ 
 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
 ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
+;;; Copyright © 2021 Robby Zambito <contact@robbyzambito.me>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2434,3 +2435,38 @@  seeks to add support for the screenshot, screencast, and possibly
 remote-desktop @code{xdg-desktop-portal} interfaces for wlroots based
 compositors.")
     (license license:expat)))
+
+(define-public waypipe
+  (package
+    (name "waypipe")
+    (version "0.8.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.freedesktop.org/mstoeckl/waypipe")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qa47ljfvb1vv3h647xwn1j5j8gfmcmdfaz4j8ygnkvj36y87vnz"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-sleep-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((coreutils (assoc-ref inputs "coreutils")))
+               (substitute* "./test/startup_failure.py"
+                 (("sleep") (string-append coreutils "/bin/sleep")))))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("scdoc" ,scdoc)
+       ;; For tests
+       ("python" ,python)
+       ("coreutils" ,coreutils)))
+    (home-page "https://gitlab.freedesktop.org/mstoeckl/waypipe")
+    (synopsis "Proxy for Wayland protocol applications")
+    (description
+     "Waypipe is a proxy for Wayland clients, with the aim of
+supporting behavior like ssh -X.")
+    (license license:expat)))