diff mbox series

[bug#69803,rust-team,14/37] gnu: Add rust-accesskit-winit-0.16.

Message ID 20240314211638.6190-14-herman@rimm.ee
State New
Headers show
Series [bug#69803,rust-team,01/37] gnu: Add rust-rename-item-0.1. | expand

Commit Message

Herman Rimm March 14, 2024, 9:16 p.m. UTC
* gnu/packages/crates-io.scm (rust-accesskit-winit-0.16): Add variable.

Change-Id: I8f3638de3d6fdceff2fd9f95f9dfab826923bbf2
---
 gnu/local.mk                                  |  1 +
 gnu/packages/crates-io.scm                    | 26 +++++++++++++++++++
 .../rust-accesskit-winit-unix-only.patch      | 22 ++++++++++++++++
 3 files changed, 49 insertions(+)
 create mode 100644 gnu/packages/patches/rust-accesskit-winit-unix-only.patch
diff mbox series

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 4750cb290c..503122d2aa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2005,6 +2005,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/rustc-1.54.0-src.patch			\
   %D%/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch	\
   %D%/packages/patches/rust-1.70-fix-rustix-build.patch	\
+  %D%/packages/patches/rust-accesskit-winit-unix-only.patch	\
   %D%/packages/patches/rust-cargo-edit-remove-ureq.patch	\
   %D%/packages/patches/rust-ring-0.17-ring-core.patch		\
   %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch	\
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 0ea8d90b64..c37ca845a9 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -377,6 +377,32 @@  (define-public rust-accesskit-unix-0.6
 accessibility infrastructure.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-accesskit-winit-0.16
+  (package
+    (name "rust-accesskit-winit")
+    (version "0.16.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "accesskit_winit" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0rwaz6mkllcl131b8y4s787gfmdrqzms0a242r8f3n8pra52312j"))
+       (patches (search-patches "rust-accesskit-winit-unix-only.patch"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-accesskit" ,rust-accesskit-0.12)
+        ("rust-accesskit-unix" ,rust-accesskit-unix-0.6)
+        ("rust-winit" ,rust-winit-0.29))
+       #:cargo-development-inputs (("rust-winit" ,rust-winit-0.29))))
+    (home-page "https://github.com/AccessKit/accesskit")
+    (synopsis "AccessKit UI accessibility infrastructure: winit adapter")
+    (description
+     "This package provides a winit adapter for @code{AccessKit} UI
+accessibility infrastructure.")
+    (license license:asl2.0)))
+
 (define-public rust-adaptive-barrier-1
   (package
     (name "rust-adaptive-barrier")
diff --git a/gnu/packages/patches/rust-accesskit-winit-unix-only.patch b/gnu/packages/patches/rust-accesskit-winit-unix-only.patch
new file mode 100644
index 0000000000..5be5caa562
--- /dev/null
+++ b/gnu/packages/patches/rust-accesskit-winit-unix-only.patch
@@ -0,0 +1,22 @@ 
+diff --git a/Cargo.toml b/Cargo.toml
+index c382831..76b065a 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -39,7 +39,6 @@ version = "0.12.1"
+ [dependencies.winit]
+ version = "0.29"
+ features = ["rwh_06"]
+-default-features = false
+ 
+ [dev-dependencies.winit]
+ version = "0.29"
+@@ -64,9 +63,3 @@ tokio = ["accesskit_unix/tokio"]
+ version = "0.6.1"
+ optional = true
+ default-features = false
+-
+-[target."cfg(target_os = \"macos\")".dependencies.accesskit_macos]
+-version = "0.10.1"
+-
+-[target."cfg(target_os = \"windows\")".dependencies.accesskit_windows]
+-version = "0.15.1"