diff mbox series

[bug#54299,26/27] added rust-wayland-sys@0.29

Message ID 20220308173127.21218-25-trzickel@illegalaliensfrom.space
State New
Headers show
Series None | expand

Commit Message

Till Robin Zickel March 8, 2022, 5:31 p.m. UTC
---
 gnu/packages/crates-graphics.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

M March 8, 2022, 5:47 p.m. UTC | #1
Till Robin Zickel schreef op di 08-03-2022 om 18:31 [+0100]:
> +             (let ((libwayland (assoc-ref inputs "wayland")))
> +               (substitute* (find-files "src" "\\.rs$")
> +                 (("libwayland.*\\.so" shared-lib) (string-append libwayland

Input labels are being phased-out, I recommend using search-input-file
here instead.

Greetings,
Maxime.
M March 8, 2022, 5:48 p.m. UTC | #2
Till Robin Zickel schreef op di 08-03-2022 om 18:31 [+0100]:
> +               #t))))))

No need for trailing #t anymore.
M March 8, 2022, 5:49 p.m. UTC | #3
Till Robin Zickel schreef op di 08-03-2022 om 18:31 [+0100]:
> +                  rust-pkg-config-0.3 rust-memoffset-0.6))

Why are these both in #:cargo-inputs and 'inputs'?
Also, what's the 'rust-pkg-config' input for?
M March 8, 2022, 5:51 p.m. UTC | #4
Till Robin Zickel schreef op di 08-03-2022 om 18:31 [+0100]:
> +                       ("rust-pkg-config" ,rust-pkg-config-0.3))

If it's anything like 'pkg-config', this looks more something for
'native-inputs' or '#:cargo-development-inputs' to me.
diff mbox series

Patch

diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
index 48abc64d62..875435fca9 100644
--- a/gnu/packages/crates-graphics.scm
+++ b/gnu/packages/crates-graphics.scm
@@ -3095,6 +3095,37 @@  (define-public rust-wayland-sys-0.28
 crate @code{rust-wayland-client} for usable bindings.")
     (license license:expat)))
 
+(define-public rust-wayland-sys-0.29
+  (package
+    (inherit rust-wayland-sys-0.28)
+    (name "rust-wayland-sys")
+    (version "0.29.4")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "wayland-sys" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1m2jwk5q36jidwbdmdicmi27r9dzi4wanzg3i28nfxc9kbvisd6r"))))
+    (arguments
+     `(#:cargo-inputs (("rust-dlib" ,rust-dlib-0.5) ("rust-lazy-static" ,rust-lazy-static-1)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-memoffset" ,rust-memoffset-0.6)
+                       ("rust-pkg-config" ,rust-pkg-config-0.3))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libraries
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((libwayland (assoc-ref inputs "wayland")))
+               (substitute* (find-files "src" "\\.rs$")
+                 (("libwayland.*\\.so" shared-lib) (string-append libwayland
+                                                                  "/lib/"
+                                                                  shared-lib)))
+               #t))))))
+    (inputs (list rust-dlib-0.5 rust-lazy-static-1 rust-libc-0.2
+                  rust-pkg-config-0.3 rust-memoffset-0.6))
+    (propagated-inputs (list wayland))))
+
 (define-public rust-wayland-sys-0.23
   (package
     (inherit rust-wayland-sys-0.28)