summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-04-24 17:46:11 +0200
committerGitHub <noreply@github.com>2024-04-24 09:46:11 -0600
commit1eb6977049d7ccece2d46b9d1db4f43cf2e6865f (patch)
tree48abe8e506dd6d12c4725c3d904f92b81928913e /var
parent3f1cfdb7d70debf1d58954a0bdffa6eb70486896 (diff)
downloadspack-1eb6977049d7ccece2d46b9d1db4f43cf2e6865f.tar.gz
spack-1eb6977049d7ccece2d46b9d1db4f43cf2e6865f.tar.bz2
spack-1eb6977049d7ccece2d46b9d1db4f43cf2e6865f.tar.xz
spack-1eb6977049d7ccece2d46b9d1db4f43cf2e6865f.zip
rust: use system libs (#43797)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/rust/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py
index bbfbde58d0..0068d3c3e7 100644
--- a/var/spack/repos/builtin/packages/rust/package.py
+++ b/var/spack/repos/builtin/packages/rust/package.py
@@ -56,10 +56,12 @@ class Rust(Package):
depends_on("cmake@3.13.4:", type="build")
depends_on("curl+nghttp2")
depends_on("libgit2")
+ depends_on("libssh2")
depends_on("ninja", type="build")
depends_on("openssl")
depends_on("pkgconfig", type="build")
depends_on("python", type="build")
+ depends_on("zlib-api")
# Compiling Rust requires a previous version of Rust.
# The easiest way to bootstrap a Rust environment is to
@@ -94,6 +96,11 @@ class Rust(Package):
module.cargo = Executable(os.path.join(self.spec.prefix.bin, "cargo"))
def setup_build_environment(self, env):
+ # Manually instruct Cargo dependency libssh2-sys to build with
+ # the Spack installed libssh2 package. For more info see
+ # https://github.com/alexcrichton/ssh2-rs/issues/173
+ env.set("LIBSSH2_SYS_USE_PKG_CONFIG", "1")
+
# Manually inject the path of ar for build.
ar = which("ar", required=True)
env.set("AR", ar.path)