all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre Langlois <pierre.langlois@gmx.com>
To: 63348@debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois@gmx.com>
Subject: [bug#63348] [PATCH 3/4] gnu: Add rust-webbrowser-0.8.
Date: Sun,  7 May 2023 14:26:21 +0100	[thread overview]
Message-ID: <a2eba9c775c28e0e3f19adbb0264f4ac5f9e6ad0.1683465958.git.pierre.langlois@gmx.com> (raw)
In-Reply-To: <fc2b158f1da2d8010f99c6ad97e5364294f2f518.1683465958.git.pierre.langlois@gmx.com>

* 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.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/crates-io.scm                    | 39 +++++++++++++++----
 ...ust-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

diff --git a/gnu/local.mk b/gnu/local.mk
index de5ac37ba5..cda612274a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1872,6 +1872,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/rust-nettle-sys-disable-vendor.patch	 \
   %D%/packages/patches/rust-openssl-sys-no-vendor.patch	\
   %D%/packages/patches/rust-wl-clipboard-rs-newer-wl.patch      \
+  %D%/packages/patches/rust-webbrowser-remove-unsupported-os.patch	\
   %D%/packages/patches/rw-igraph-0.10.patch			\
   %D%/packages/patches/sbc-fix-build-non-x86.patch		\
   %D%/packages/patches/sbcl-aserve-add-HTML-5-elements.patch	\
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 22eeceb2fc..d912441f4d 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -67832,8 +67832,38 @@ (define-public rust-web-sys-0.3
      "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
@@ -67849,14 +67879,7 @@ (define-public rust-webbrowser-0.5
        #: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"
--
2.39.2





  parent reply	other threads:[~2023-05-07 13:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-07 13:12 [bug#63348] [PATCH 0/4] Fix tree-sitter-cli build after 0.20.8 update Pierre Langlois
2023-05-07 13:26 ` [bug#63348] [PATCH 1/4] gnu: Add rust-unindent-0.2 Pierre Langlois
2023-05-07 13:26   ` [bug#63348] [PATCH 2/4] gnu: Update rust-tiny-http to 0.12.0 Pierre Langlois
2023-05-07 13:26   ` Pierre Langlois [this message]
2023-05-07 13:26   ` [bug#63348] [PATCH 4/4] gnu: tree-sitter-cli: Fix build with 0.20.8 version Pierre Langlois
2023-05-07 16:49 ` bug#63348: [PATCH 0/4] Fix tree-sitter-cli build after 0.20.8 update Efraim Flashner
2023-05-07 17:10   ` [bug#63348] " Pierre Langlois

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2eba9c775c28e0e3f19adbb0264f4ac5f9e6ad0.1683465958.git.pierre.langlois@gmx.com \
    --to=pierre.langlois@gmx.com \
    --cc=63348@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.