diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2020-01-21 17:22:59 +0100 |
---|---|---|
committer | Andreas Rammhold <andreas@rammhold.de> | 2020-01-21 17:22:59 +0100 |
commit | d6a8b55fb0fd9f41f3c83982a5e3a7b7d7a4f01f (patch) | |
tree | bc418289b5a381b01c8ee830d893bf9cc0b1ce6d /pkgs/build-support/rust/build-rust-crate | |
parent | 60fea726dea16131b1ea621f56d9e208b2123758 (diff) | |
download | nixpkgs-d6a8b55fb0fd9f41f3c83982a5e3a7b7d7a4f01f.tar nixpkgs-d6a8b55fb0fd9f41f3c83982a5e3a7b7d7a4f01f.tar.gz nixpkgs-d6a8b55fb0fd9f41f3c83982a5e3a7b7d7a4f01f.tar.bz2 nixpkgs-d6a8b55fb0fd9f41f3c83982a5e3a7b7d7a4f01f.tar.lz nixpkgs-d6a8b55fb0fd9f41f3c83982a5e3a7b7d7a4f01f.tar.xz nixpkgs-d6a8b55fb0fd9f41f3c83982a5e3a7b7d7a4f01f.tar.zst nixpkgs-d6a8b55fb0fd9f41f3c83982a5e3a7b7d7a4f01f.zip |
buildRustCrate: treat `rlib` crates just like `lib` crates
Both version provide `rlib` files to link against. Previously we would try to find a matching shared library in the `lib` output.
Diffstat (limited to 'pkgs/build-support/rust/build-rust-crate')
-rw-r--r-- | pkgs/build-support/rust/build-rust-crate/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/rust/build-rust-crate/default.nix b/pkgs/build-support/rust/build-rust-crate/default.nix index 2885b2aef51..569b48d25ae 100644 --- a/pkgs/build-support/rust/build-rust-crate/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/default.nix @@ -23,7 +23,7 @@ let lib.strings.replaceStrings ["-"] ["_"] crateRenames.${dep.crateName} else extern; - in (if lib.any (x: x == "lib") dep.crateType then + in (if lib.any (x: x == "lib" || x == "rlib") dep.crateType then " --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}.rlib" else " --extern ${name}=${dep.lib}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}") |