diff mbox series

[bug#50084] gnu: Add waypipe.

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

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Robby Zambito Aug. 17, 2021, 1:53 a.m. UTC
* gnu/packages/xdisorg.scm (waypipe): New variable.
---
 gnu/packages/xdisorg.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Paul A. Patience Aug. 18, 2021, 10:56 p.m. UTC | #1
Hi,

> +         (add-after 'unpack 'fix-sleep-path
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))

out is not used anywhere, so you can remove it, along with the outputs
argument of the lambda.

> +                   (coreutils (assoc-ref inputs "coreutils")))
> +               (substitute* "./test/startup_failure.py"
> +                 (("sleep")
> +                  (string-append coreutils "/bin/sleep")))
> +               #t))))))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)
> +       ("scdoc" ,scdoc)))
> +    (inputs
> +     ;; For tests
> +     `(("python" ,python)
> +       ("coreutils" ,coreutils)))

I haven't tried building this or anything, but if python and coreutils
are really only needed for tests, then they need not be in inputs (and
the fact that the initial version of this patch didn't have them at all
supports this thesis).
In other words, I'd put everything in native-inputs.

Also (and this is really minor), arguments normally follows the inputs
sections.

Best regards,
Paul
Robby Zambito Aug. 19, 2021, 10:11 p.m. UTC | #2
Hi Maxime,

> It is impossible to cross-compile waypipe on master, because
> meson-build-system does not support cross-compilation (on master).
> 
> # replace 'glib' with 'waypipe'
> $ LC_ALL=C guix build glib --target=arm-linux-gnueabihf
> guix build: error: gnu/packages/glib.scm:425:2: glib <at> 2.62.6: build
> system `meson' does not support cross builds

You are correct, I am not actually able to cross compile. I was
confusing the virtualized build with cross-compiling.

> What branch are you on?

master

> Also, what arguments did you pass to "guix build"?
> You need --target=arm-linux-gnueabihf for cross-compilation,
> not --system=armhf-linux.  The latter is for offloading to an armhf
> machine or a QEMU emulated build.

--target does not work, --system does.

Sincerely,
Robby
diff mbox series

Patch

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 71c2ea4cbc..d79f580b47 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -50,6 +50,7 @@ 
 ;;; Copyright © 2021 Niklas Eklund <niklas.eklund@posteo.net>
 ;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
 ;;; Copyright © 2021 ikasero <ahmed@ikasero.com>
+;;; Copyright © 2021 Robby Zambito <contact@robbyzambito.me>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -866,6 +867,33 @@  predefined region or a particular window.  Also, it makes it possible to
 include cursor in the resulting image.")
     (license license:gpl3+)))
 
+(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)
+    ;; One test fails where the program does not exit cleanly given a bad
+    ;; setup. Not ideal but probably safe to ignore. Check that no other tests
+    ;; fail before bumping the version. If all tests pass, remove this.
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'check))))
+    (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)))
+
 (define-public unclutter
   (package
     (name "unclutter")