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}")