diff options
author | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2020-04-23 23:10:51 +0200 |
---|---|---|
committer | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2020-05-05 13:20:45 +0200 |
commit | 5effc5bfe1f9bbe94be9ac8bd40e2f2875b08720 (patch) | |
tree | 56eee744d79ae65e4744846001cf465b5031d59e /gnu/packages/patches | |
parent | cfb9bc26cc1d6d239e837dcb7423045c0d4fadec (diff) | |
download | guix-patches-5effc5bfe1f9bbe94be9ac8bd40e2f2875b08720.tar guix-patches-5effc5bfe1f9bbe94be9ac8bd40e2f2875b08720.tar.gz |
gnu: Add rust-nettle-sys-2.
* 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.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/rust-nettle-sys-disable-vendor.patch | 48 |
1 files changed, 48 insertions, 0 deletions
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 <dkg@fifthhorseman.net> + +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") { |