From 3cede546d4e3a070faf08e2efa095dcdcbbbdfda Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 9 Mar 2023 17:50:59 +0200 Subject: gnu: rust-adblock: Update to 0.7.5. * gnu/packages/crates-io.scm (rust-adblock-0.4): Replace with rust-adblock-0.7.5. [source]: Remove patch. [arguments]: Add cargo-test-flags. [cargo-inputs]: Replace rust-cssparser-0.25 with 0.28, rust-selectors-0.21 with 0.23. [cargo-development-inputs]: Replace rust-criterion-0.3 with 0.4, rust-tokio-1.8 with rust-tokio. [native-inputs]: Remove pkg-config, openssl. * gnu/packages/patches/rust-adblock-ignore-live-tests.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- .../patches/rust-adblock-ignore-live-tests.patch | 69 ---------------------- 1 file changed, 69 deletions(-) delete mode 100644 gnu/packages/patches/rust-adblock-ignore-live-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/rust-adblock-ignore-live-tests.patch b/gnu/packages/patches/rust-adblock-ignore-live-tests.patch deleted file mode 100644 index fc7f2858ff..0000000000 --- a/gnu/packages/patches/rust-adblock-ignore-live-tests.patch +++ /dev/null @@ -1,69 +0,0 @@ -From b83b5b453d3f7883ef4c12f84a7045486957c709 Mon Sep 17 00:00:00 2001 -From: Petr Hodina -Date: Tue, 9 Nov 2021 17:02:54 +0100 -Subject: [PATCH] Ignore live tests. - - -diff --git a/tests/live.rs b/tests/live.rs -index b1a19fc..6bd4685 100644 ---- a/tests/live.rs -+++ b/tests/live.rs -@@ -140,6 +140,7 @@ fn get_blocker_engine_deserialized_ios() -> Engine { - } - - #[test] -+#[ignore] - fn check_live_specific_urls() { - let mut engine = get_blocker_engine(); - { -@@ -176,6 +177,7 @@ fn check_live_specific_urls() { - } - - #[test] -+#[ignore] - fn check_live_deserialized_specific_urls() { - let mut engine = get_blocker_engine_deserialized(); - { -@@ -201,6 +203,7 @@ fn check_live_deserialized_specific_urls() { - } - - #[test] -+#[ignore] - fn check_live_from_filterlists() { - let engine = get_blocker_engine(); - let requests = load_requests(); -@@ -214,6 +217,7 @@ fn check_live_from_filterlists() { - } - - #[test] -+#[ignore] - fn check_live_deserialized_file() { - let engine = get_blocker_engine_deserialized(); - let requests = load_requests(); -@@ -243,6 +247,7 @@ fn check_live_deserialized_ios() { - - #[cfg(feature = "resource_assembler")] - #[test] -+#[ignore] - fn check_live_redirects() { - use adblock::resources::resource_assembler::assemble_web_accessible_resources; - -@@ -278,6 +283,7 @@ fn check_live_redirects() { - } - - #[test] -+#[ignore] - /// Ensure that two different engines loaded from the same textual filter set serialize to - /// identical buffers. - fn stable_serialization() { -@@ -291,6 +297,7 @@ fn stable_serialization() { - } - - #[test] -+#[ignore] - /// Ensure that one engine's serialization result can be exactly reproduced by another engine after - /// deserializing from it. - fn stable_serialization_through_load() { --- -2.33.1 - -- cgit v1.2.3 From 84c70fd18a9f6f9199d287b2fc43b53dfb4926d1 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sun, 7 May 2023 14:26:21 +0100 Subject: gnu: Add rust-webbrowser-0.8. * gnu/packages/crates-io.scm (rust-webbrowser-0.8): New variable. (rust-webbrowser-0.5): Inherit from rust-webbrowser-0.8. * gnu/packages/patches/rust-webbrowser-remove-unsupported-os.patch: New file. * gnu/local.mk: Register it. Signed-off-by: Efraim Flashner --- gnu/local.mk | 1 + gnu/packages/crates-io.scm | 39 +++++++++++++++++----- .../rust-webbrowser-remove-unsupported-os.patch | 24 +++++++++++++ 3 files changed, 56 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/rust-webbrowser-remove-unsupported-os.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a882fc883e..dfb8930771 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1870,6 +1870,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-nettle-disable-vendor.patch \ %D%/packages/patches/rust-nettle-sys-disable-vendor.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ + %D%/packages/patches/rust-webbrowser-remove-unsupported-os.patch \ %D%/packages/patches/rust-wl-clipboard-rs-newer-wl.patch \ %D%/packages/patches/rw-igraph-0.10.patch \ %D%/packages/patches/sbc-fix-build-non-x86.patch \ diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index f581902a6c..3547d67fac 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -71399,8 +71399,38 @@ applications.") "Bindings for all Web APIs, a procedurally generated crate from WebIDL.") (license (list license:expat license:asl2.0)))) +(define-public rust-webbrowser-0.8 + (package + (name "rust-webbrowser") + (version "0.8.8") + (source + (origin + (method url-fetch) + (uri (crate-uri "webbrowser" version)) + (file-name (string-append name "-" version ".tar.gz")) + ;; Explicitely remove dependencies for unsupported operating systems, + ;; to avoid pulling many dependencies and causing rust world rebuilds. + (patches (search-patches "rust-webbrowser-remove-unsupported-os.patch")) + (patch-flags '("-p0")) + (sha256 + (base32 "0zk1qidyksspa8pgvq8bh2lyqmmrs0fr5r1qsyhbzrawpn2w972p")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-dirs" ,rust-dirs-4) + ("rust-log" ,rust-log-0.4) + ("rust-url" ,rust-url-2) + ("rust-web-sys" ,rust-web-sys-0.3)))) + (home-page "https://github.com/amodm/webbrowser-rs") + (synopsis "Open URLs in web browsers available on a platform") + (description + "Webbrowser-rs is a Rust library to open URLs in the web browsers +available on a platform.") + (license (list license:expat license:asl2.0)))) + (define-public rust-webbrowser-0.5 (package + (inherit rust-webbrowser-0.8) (name "rust-webbrowser") (version "0.5.5") (source @@ -71416,14 +71446,7 @@ applications.") #:cargo-inputs (("rust-web-sys" ,rust-web-sys-0.3) ("rust-widestring" ,rust-widestring-0.4) - ("rust-winapi" ,rust-winapi-0.3)))) - (home-page - "https://github.com/amodm/webbrowser-rs") - (synopsis "Open URLs in web browsers available on a platform") - (description - "Webbrowser-rs is a Rust library to open URLs in the web browsers -available on a platform.") - (license (list license:expat license:asl2.0)))) + ("rust-winapi" ,rust-winapi-0.3)))))) (define-public rust-webpki-0.22 (package diff --git a/gnu/packages/patches/rust-webbrowser-remove-unsupported-os.patch b/gnu/packages/patches/rust-webbrowser-remove-unsupported-os.patch new file mode 100644 index 0000000000..9fea1e1665 --- /dev/null +++ b/gnu/packages/patches/rust-webbrowser-remove-unsupported-os.patch @@ -0,0 +1,24 @@ +--- Cargo.toml 2023-05-07 13:39:13.029066693 +0100 ++++ Cargo.toml 2023-05-07 13:39:22.545138206 +0100 +@@ -67,21 +67,3 @@ + [target."cfg(target_arch = \"wasm32\")".dependencies.web-sys] + version = "0.3" + features = ["Window"] +- +-[target."cfg(target_os = \"android\")".dependencies.jni] +-version = "0.21" +- +-[target."cfg(target_os = \"android\")".dependencies.ndk-context] +-version = "0.1" +- +-[target."cfg(target_os = \"android\")".dev-dependencies.ndk-glue] +-version = ">= 0.3, <= 0.7" +- +-[target."cfg(target_os = \"ios\")".dependencies.objc] +-version = "0.2.7" +- +-[target."cfg(target_os = \"ios\")".dependencies.raw-window-handle] +-version = "0.5.0" +- +-[target."cfg(target_os = \"macos\")".dependencies.core-foundation] +-version = "0.9" -- cgit v1.2.3