From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +PpgBsQzsF7GTAAA0tVLHw (envelope-from ) for ; Mon, 04 May 2020 15:24:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uFzLEM8zsF6oVwAAbx9fmQ (envelope-from ) for ; Mon, 04 May 2020 15:25:03 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8DC97944E19 for ; Mon, 4 May 2020 15:13:17 +0000 (UTC) Received: from localhost ([::1]:41984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcmT-0000ka-SV for larch@yhetil.org; Mon, 04 May 2020 11:13:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVcmG-0000ix-1Q for guix-patches@gnu.org; Mon, 04 May 2020 11:13:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50386) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVcmF-0005oZ-OD for guix-patches@gnu.org; Mon, 04 May 2020 11:13:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVcmF-0002Sf-KE for guix-patches@gnu.org; Mon, 04 May 2020 11:13:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40874] [PATCH v2 2/3] gnu: Add rust-nettle-sys-2. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 May 2020 15:13:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40874 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40874@debbugs.gnu.org Cc: Hartmut Goebel , Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org, 40874@debbugs.gnu.org Received: via spool by 40874-submit@debbugs.gnu.org id=B40874.15886051519344 (code B ref 40874); Mon, 04 May 2020 15:13:03 +0000 Received: (at 40874) by debbugs.gnu.org; 4 May 2020 15:12:31 +0000 Received: from localhost ([127.0.0.1]:33686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVcli-0002Qe-J4 for submit@debbugs.gnu.org; Mon, 04 May 2020 11:12:30 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:60517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVcle-0002QS-7M for 40874@debbugs.gnu.org; Mon, 04 May 2020 11:12:30 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49G5tw6mX1z1r75t; Mon, 4 May 2020 17:12:24 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49G5tw5047z1qqlC; Mon, 4 May 2020 17:12:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id OXQk5dMsliI1; Mon, 4 May 2020 17:12:23 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-60-223.dynamic.mnet-online.de [188.174.60.223]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 4 May 2020 17:12:23 +0200 (CEST) Received: from lenashee.fritz.box (lenashee.fritz.box [192.168.110.28]) by hermia.goebel-consult.de (Postfix) with ESMTP id 87C09601AE; Mon, 4 May 2020 17:13:19 +0200 (CEST) From: Hartmut Goebel Date: Mon, 4 May 2020 17:11:18 +0200 Message-Id: <9156803732380ea906e92b5d738f8cdb591897df.1588604978.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <754dc70567f6058f506c6a75598c9d00685c82b8.1587919230.git.h.goebel@crazy-compilers.com> References: <754dc70567f6058f506c6a75598c9d00685c82b8.1587919230.git.h.goebel@crazy-compilers.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 X-Spam-Score: 3.99 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [3.99 / 13.00]; GENERIC_REPUTATION(0.00)[-0.49489792163276]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; R_MISSING_CHARSET(2.50)[]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; RCVD_COUNT_TWELVE(0.00)[12]; BROKEN_CONTENT_TYPE(1.50)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.13), country: US(-0.00), ip: 2001:470:142::17(-0.49)]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[h.goebel@crazy-compilers.com,guix-patches-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; URIBL_BLOCKED(0.00)[fifthhorseman.net:email,gitlab.com:url,build.rs:url]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[crazy-compilers.com]; HAS_LIST_UNSUB(-0.01)[]; RECEIVED_SPAMHAUS_PBL(0.00)[188.174.60.223:received]; MID_CONTAINS_FROM(1.00)[]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: 4WlFiXTbUGEM * gnu/packages/crates-io.scm (rust-nettle-sys-2): New variable. * gnu/packages/patches/rust-nettle-sys-disable-vendor.patch: New file. * gnu/local.mk: Add it. --- gnu/local.mk | 1 + gnu/packages/crates-io.scm | 31 ++++++++++++ .../rust-nettle-sys-disable-vendor.patch | 48 +++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 gnu/packages/patches/rust-nettle-sys-disable-vendor.patch diff --git a/gnu/local.mk b/gnu/local.mk index 9f212434a9..f7ffe75eb3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1425,6 +1425,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-bootstrap-stage0-test.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \ + %D%/packages/patches/rust-nettle-sys-disable-vendor.patch \ %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index a6dd9a4ef1..16855a8bff 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -37,6 +37,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages jemalloc) #:use-module (gnu packages llvm) + #:use-module (gnu packages nettle) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -11942,6 +11943,36 @@ types as proposed in RFC 1158.") (license (list license:asl2.0 license:expat)))) +(define-public rust-nettle-sys-2 + (package + (name "rust-nettle-sys") + (version "2.0.4") + (source + (origin + (method url-fetch) + (uri (crate-uri "nettle-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1yq1w6dlcmg89x529i7s20j29afdhgim7qnsa7978fszzwrr6qmq")) + (patches (search-patches "rust-nettle-sys-disable-vendor.patch")))) + (build-system cargo-build-system) + (native-inputs + `(("clang" ,clang) + ("pkg-config" ,pkg-config))) + (inputs + `(("nettle", nettle))) + (arguments + `(#:skip-build? #t + #:cargo-development-inputs + (("rust-bindgen" ,rust-bindgen-0.51) + ("rust-pkg-config" ,rust-pkg-config-0.3)))) + (home-page "https://gitlab.com/sequoia-pgp/nettle-sys") + (synopsis "Low-level Rust bindings for the Nettle cryptographic library") + (description "This package provides low-level Rust bindings for the Nettle +cryptographic library.") + (license ;; licensed under either of these, at your option + (list license:lgpl3 license:gpl2 license:gpl3)))) + (define-public rust-new-debug-unreachable-1.0 (package (name "rust-new-debug-unreachable") diff --git a/gnu/packages/patches/rust-nettle-sys-disable-vendor.patch b/gnu/packages/patches/rust-nettle-sys-disable-vendor.patch new file mode 100644 index 0000000000..ae5ef5ebe0 --- /dev/null +++ b/gnu/packages/patches/rust-nettle-sys-disable-vendor.patch @@ -0,0 +1,48 @@ +Subject: nettle-sys: clear out "vendored" feature cruft from build.rs +From: Daniel Kahn Gillmor's avatarDaniel Kahn Gillmor + +https://salsa.debian.org/rust-team/debcargo-conf/-/commit/0c71150ad26bb66a8396dcdab055181af232ddc5 +https://sources.debian.org/src/rust-nettle-sys/2.0.4-3/debian/patches/disable-vendor.diff/ +--- a/Cargo.toml 2019-10-23 13:08:07.000000000 -0400 ++++ b/Cargo.toml 2019-10-23 14:08:46.644064014 -0400 +@@ -29,12 +29,9 @@ + version = "0.51.1" + default-features = false + +-[build-dependencies.nettle-src] +-version = "3.5.1-0" +-optional = true +- + [build-dependencies.pkg-config] + version = "0.3" + + [features] + vendored = ["nettle-src"] ++nettle-src = [] +diff --git a/build.rs b/build.rs +index 44f7af3..ede4b2f 100644 +--- a/build.rs ++++ b/build.rs +@@ -1,7 +1,5 @@ + extern crate bindgen; + extern crate pkg_config; +-#[cfg(feature = "vendored")] +-extern crate nettle_src; + + use std::env; + use std::fs; +@@ -36,14 +34,6 @@ fn main() { + println!("cargo:rerun-if-env-changed=NETTLE_STATIC"); + println!("cargo:rerun-if-env-changed={}", NETTLE_PREGENERATED_BINDINGS); + +- #[cfg(feature = "vendored")] +- { +- let artifacts = nettle_src::Build::new().build(); +- println!("cargo:vendored=1"); +- env::set_var("PKG_CONFIG_PATH", +- artifacts.lib_dir().join("pkgconfig")); +- } +- + let nettle = pkg_config::probe_library("nettle hogweed").unwrap(); + + let mode = match env::var_os("NETTLE_STATIC") { -- 2.21.3