From patchwork Sat May 4 14:46:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Franz Geffke X-Patchwork-Id: 64095 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 07BA627BBE9; Sat, 4 May 2024 15:58:44 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 16EA127BBE2 for ; Sat, 4 May 2024 15:58:41 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3Gq7-0002jm-3Y; Sat, 04 May 2024 10:58:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3Gfr-0008It-Sl for guix-patches@gnu.org; Sat, 04 May 2024 10:47:41 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3Gfr-00064p-K8 for guix-patches@gnu.org; Sat, 04 May 2024 10:47:39 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3GgE-0001c5-5y; Sat, 04 May 2024 10:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70772] [PATCH] gnu: Add rust-serialport Resent-From: Franz Geffke Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Sat, 04 May 2024 14:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70772 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70772@debbugs.gnu.org Cc: Franz Geffke , Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by submit@debbugs.gnu.org id=B.17148340766193 (code B ref -1); Sat, 04 May 2024 14:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2024 14:47:56 +0000 Received: from localhost ([127.0.0.1]:54089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3Gg7-0001bp-DE for submit@debbugs.gnu.org; Sat, 04 May 2024 10:47:55 -0400 Received: from lists.gnu.org ([2001:470:142::17]:38962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3Gg3-0001be-Ht for submit@debbugs.gnu.org; Sat, 04 May 2024 10:47:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3Gfa-0008E2-MG for guix-patches@gnu.org; Sat, 04 May 2024 10:47:22 -0400 Received: from wfhigh2-smtp.messagingengine.com ([64.147.123.153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3GfY-0005vq-4Z for guix-patches@gnu.org; Sat, 04 May 2024 10:47:22 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 2F44C18001EB; Sat, 4 May 2024 10:47:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 04 May 2024 10:47:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=f-a.nz; h=cc:cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm3; t=1714834035; x=1714920435; bh=inJ9fSzpGzY/v8dRFawaE /Ku1hEavmJoNnbCmZZJUas=; b=s+6F3qVHuWsJEVoJLmn5zMIyJdV476bIwNZg0 zxkw4i0sUuUCHZG1roNyCroG+VFOSxzw0EusgXG38Wxd9VINLF910ofqXmwJj+pj zTjHXX/0qmvtVsIA/zP4vYcqLj7Mv3WJFuHgjgOheqfr4uY1qi+/kf2O9VISSqGd zFCWSEQxXYDamrncchehAw5n4jnq2yIL6UPxA+3SFSdIuYm4Rng0FbsyQVcLct3f PYNjdpyqqMMJfw9DVsiV1NUYhsO1FUcM6fQ3sSloUsaC9cCq8EdnF6+InQGyKvAE VYw/+pCUI90evIj4AfC3pIFhKS9A5h+Kwqx58QtsC0z67f/4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1714834035; x=1714920435; bh=inJ9fSzpGzY/v8dRFawaE/Ku1hEa vmJoNnbCmZZJUas=; b=AkiPRe/wQvuSQ0BA5lltHL+wShXv23oRMnMAJIAYh9fk THCEiLGn7gOsIWZ2I4KLB5mP6Z5RTAxd63RvvVRP0KmxVkhu2bVzeLXVArWezgXB ZWIsJCR4cirbv5raS/q+m6BI6vlhtMjWs2saMF9WB9+uP1HRT/rhREMeTavI+j3F bKaFrhsn8G2FD8BX1CxbgbwCfaNOgHXTDQEIrMK77KkwNl2vYHH5t3/NYCSxhoa/ kNYTvv4lCEs8mdNYmISE2jM3oowE4x5keGnV790scgZC7h4kQXMfTDqi+aizy4RX L45aU9j9p76U/QCFwLNWtIOjgFNfYXhJt43I314PFA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvvddgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefhrhgrnhiiucfivghffhhkvgcuoehmsehfqdgrrdhniieqnecu ggftrfgrthhtvghrnhepfeeguedukeevveekvdfhkefghffhgeegudfgueffjeeiveeiue dtgefggfdviefhnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsehfqdgrrdhnii X-ME-Proxy: Feedback-ID: ie0194279:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 4 May 2024 10:47:14 -0400 (EDT) From: Franz Geffke Date: Sat, 4 May 2024 15:46:33 +0100 Message-ID: <6b33aa66caf9a6854564c359c559018e23ba9185.1714833993.git.m@f-a.nz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=64.147.123.153; envelope-from=m@f-a.nz; helo=wfhigh2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sat, 04 May 2024 10:58:12 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Change-Id: I7935aab748ffd86569cac0af2e91da02323c4123 --- gnu/packages/crates-io.scm | 132 ++++++++++++++++++ .../rust-serialport-remove-macos.patch | 17 +++ 2 files changed, 149 insertions(+) create mode 100644 gnu/packages/patches/rust-serialport-remove-macos.patch base-commit: 9e184d5e54d1fee98c75bcb577a98456a77ae015 diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index a67d3d74bb..35cb1028df 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -3862,6 +3862,24 @@ (define-public rust-assert2-macros-0.3 (description "This package provides procedural macros for assert2.") (license license:bsd-2))) +(define-public rust-assert-hex-0.4 + (package + (name "rust-assert_hex") + (version "0.4.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "assert_hex" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "19xwlhz2swak1gw6rv38wai7d1xn9l3mspnv1fl8rz7h60a0y0gp")))) + (build-system cargo-build-system) + (home-page "https://github.com/wcampbell0x2a/assert_hex") + (synopsis "Display assert panics in hexadecimal format") + (description + "Rust library to display assert panics in hexadecimal format") + (license license:expat))) + (define-public rust-associative-cache-1 (package (name "rust-associative-cache") @@ -34763,6 +34781,64 @@ (define-public rust-libz-ng-sys-1 high-performance zlib library.") (license (list license:expat license:asl2.0)))) +(define-public rust-libudev-sys-0.1 + (package + (name "rust-libudev-sys") + (version "0.1.4") + (source + (origin + (method url-fetch) + (uri (crate-uri "libudev-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "09236fdzlx9l0dlrsc6xx21v5x8flpfm3d5rjq9jr5ivlas6k11w")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-libc" ,rust-libc-0.2)) + #:cargo-development-inputs + (("rust-pkg-config" ,rust-pkg-config-0.3)))) + (native-inputs + (list pkg-config + eudev)) + (home-page "https://github.com/dcuddeback/libudev-rs") + (synopsis "Rust wrapper for libudev") + (description + "This crate provides a safe wrapper around the native libudev library.") + (license license:expat))) + +(define-public rust-libudev-0.3 + (package + (name "rust-libudev") + (version "0.3.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "libudev" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1q1my5alvdwyi8i9pc9gn2mcx5rhbsssmz5cjnxzfpd65laj9cvq")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "Cargo.toml" + (("0.1.3") "0.1.4")))))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-libc" ,rust-libc-0.2) + ("rust-libudev-sys" ,rust-libudev-sys-0.1)) + #:cargo-development-inputs + (("rust-pkg-config" ,rust-pkg-config-0.3)))) + (native-inputs + (list pkg-config + eudev)) + (home-page "https://github.com/dcuddeback/libudev-rs") + (synopsis "Rust wrapper for libudev") + (description + "This crate provides a safe wrapper around the native libudev library.") + (license license:expat))) + (define-public rust-lifeguard-0.6 (package (name "rust-lifeguard") @@ -61303,6 +61379,41 @@ (define-public rust-serial-test-0.4 (description "Serialising Rust tests") (license license:expat))) +(define-public rust-serialport-4 + (package + (name "rust-serialport") + (version "4.3.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "serialport" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0a380655dqrl16wfqnr75zxk3f8h3fshjjr68r4gh3clpv81anlg")) + (patches (search-patches "rust-serialport-remove-macos.patch")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-bitflags" ,rust-bitflags-2) + ("rust-cfg-if" ,rust-cfg-if-1) + ("rust-libudev" ,rust-libudev-0.3) + ("rust-nix" ,rust-nix-0.26) + ("rust-regex" ,rust-regex-1) + ("rust-scopeguard" ,rust-scopeguard-1) + ("rust-serde" ,rust-serde-1) + ("rust-unescaper" ,rust-unescaper-0.1)) + #:cargo-development-inputs (("rust-assert-hex" ,rust-assert-hex-0.4) + ("rust-clap" ,rust-clap-3)))) + (native-inputs + (list pkg-config + eudev)) + (home-page "https://github.com/serialport/serialport-rs") + (synopsis "A cross-platform serial port library in Rust.") + (description + "A cross-platform serial port library in Rust. Provides a blocking I/O +interface and port enumeration including USB device information.") + (license license:expat))) + (define-public rust-servo-fontconfig-0.5 (package (name "rust-servo-fontconfig") @@ -74909,6 +75020,27 @@ (define-public rust-unescape-0.1 "Unescapes strings with escape sequences written out as literal characters.") (license license:expat))) +(define-public rust-unescaper-0.1 + (package + (name "rust-unescaper") + (version "0.1.4") + (source + (origin + (method url-fetch) + (uri (crate-uri "unescaper" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0d4xi16mindhksi3lqvn0kzzgj5az9qbgxqmz7gwmcxm5v9nmpqa")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-thiserror" ,rust-thiserror-1)))) + (home-page "https://github.com/hack-ink/unescaper") + (synopsis "Unescape strings with escape sequences.") + (description + "Unescape strings with escape sequences written out as literal characters.") + (license license:expat))) + (define-public rust-ungrammar-1 (package (name "rust-ungrammar") diff --git a/gnu/packages/patches/rust-serialport-remove-macos.patch b/gnu/packages/patches/rust-serialport-remove-macos.patch new file mode 100644 index 0000000000..5f779a78df --- /dev/null +++ b/gnu/packages/patches/rust-serialport-remove-macos.patch @@ -0,0 +1,17 @@ +--- serialport-4.3.0/Cargo.toml 2024-05-01 16:01:21.986121155 +0100 ++++ serialport-4.3.0/Cargo.toml 2024-05-01 16:00:38.874019301 +0100 +@@ -57,15 +57,6 @@ optional = true + [target."cfg(all(target_os = \"linux\", not(target_env = \"musl\")))".dependencies.unescaper] + version = "0.1.3" + +-[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies.core-foundation-sys] +-version = "0.8.4" +- +-[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies.io-kit-sys] +-version = "0.4.0" +- +-[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies.mach2] +-version = "0.4.1" +- + [target."cfg(unix)".dependencies.bitflags] + version = "2.4.0" \ No newline at end of file