From 4363b542f276b4d6a5a8cc4c85d527fd53fb5261 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 15 Mar 2021 13:09:12 +0200 Subject: gnu: rust-wayland-sys-0.28: Adapt for new build system. * gnu/packages/crates-graphics.scm (rust-wayland-sys-0.28)[arguments]: Don't skip build. Add phase to refer explicitly to wayland libraries. [inputs]: Add rust-dlib-0.4, rust-lazy-static-1, rust-libc-0.2, rust-pkg-config-0.3. [propagated-inputs]: Add wayland. (rust-wayland-sys-0.23): Adjust accordingly. --- gnu/packages/crates-graphics.scm | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm index c26cf56394..d67e9dc02f 100644 --- a/gnu/packages/crates-graphics.scm +++ b/gnu/packages/crates-graphics.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Valentin Ignatev ;;; Copyright © 2020 Hartmut Goebel -;;; Copyright © 2020 Efraim Flashner +;;; Copyright © 2020, 2021 Efraim Flashner ;;; Copyright © 2020 John Soo ;;; Copyright © 2020 Gabriel Arazas ;;; Copyright © 2020 Raghav Gururajan @@ -2748,12 +2748,27 @@ the wayland protocol, server side.") (base32 "16f03jsy7q6p2wpaazc4w4kycyyk0fz7lacpdbcizl9m1i7874v7")))) (build-system cargo-build-system) (arguments - `(#:skip-build? #t - #:cargo-inputs + `(#:cargo-inputs (("rust-dlib" ,rust-dlib-0.4) ("rust-lazy-static" ,rust-lazy-static-1) ("rust-libc" ,rust-libc-0.2) - ("rust-pkg-config" ,rust-pkg-config-0.3)))) + ("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 + `(("rust-dlib" ,rust-dlib-0.4) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-pkg-config" ,rust-pkg-config-0.3))) + (propagated-inputs + `(("wayland" ,wayland))) (home-page "https://github.com/smithay/wayland-rs") (synopsis "FFI bindings to the various @file{libwayland-*.so} libraries") (description @@ -2778,10 +2793,13 @@ crate @code{rust-wayland-client} for usable bindings.") (base32 "1x2qafvj8hd2x5qfaan2dfpw9amg0f5g9sqrkdy7qvbddsl8jknr")))) (arguments - `(#:cargo-inputs + `(#:skip-build? #t + #:cargo-inputs (("rust-dlib" ,rust-dlib-0.4) ("rust-lazy-static" ,rust-lazy-static-1) - ("rust-libc" ,rust-libc-0.2)))))) + ("rust-libc" ,rust-libc-0.2)))) + (inputs `()) + (propagated-inputs `()))) (define-public rust-wayland-sys-0.21 (package -- cgit 1.4.1