Merge pull request #266787 from tvbeat/cargo-manifest-links

authored by Ryan Lahfa and committed by GitHub 7e869d89 809505b1

+5 -1
+2
pkgs/build-support/rust/build-rust-crate/configure-crate.nix
··· 7 , completeBuildDeps 8 , completeDeps 9 , crateAuthors 10 , crateDescription 11 , crateHomepage 12 , crateFeatures ··· 134 export CARGO_CFG_TARGET_VENDOR=${stdenv.hostPlatform.parsed.vendor.name} 135 136 export CARGO_MANIFEST_DIR=$(pwd) 137 export DEBUG="${toString (!release)}" 138 export OPT_LEVEL="${toString optLevel}" 139 export TARGET="${stdenv.hostPlatform.rust.rustcTargetSpec}"
··· 7 , completeBuildDeps 8 , completeDeps 9 , crateAuthors 10 + , crateLinks 11 , crateDescription 12 , crateHomepage 13 , crateFeatures ··· 135 export CARGO_CFG_TARGET_VENDOR=${stdenv.hostPlatform.parsed.vendor.name} 136 137 export CARGO_MANIFEST_DIR=$(pwd) 138 + export CARGO_MANIFEST_LINKS=${crateLinks} 139 export DEBUG="${toString (!release)}" 140 export OPT_LEVEL="${toString optLevel}" 141 export TARGET="${stdenv.hostPlatform.rust.rustcTargetSpec}"
+3 -1
pkgs/build-support/rust/build-rust-crate/default.nix
··· 235 "edition" 236 "buildTests" 237 "codegenUnits" 238 ]; 239 extraDerivationAttrs = builtins.removeAttrs crate processedAttrs; 240 nativeBuildInputs_ = nativeBuildInputs; ··· 317 crateDescription = crate.description or ""; 318 crateAuthors = if crate ? authors && lib.isList crate.authors then crate.authors else [ ]; 319 crateHomepage = crate.homepage or ""; 320 crateType = 321 if lib.attrByPath [ "procMacro" ] false crate then [ "proc-macro" ] else 322 if lib.attrByPath [ "plugin" ] false crate then [ "dylib" ] else ··· 337 338 configurePhase = configureCrate { 339 inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription 340 - crateFeatures crateRenames libName build workspace_member release libPath crateVersion 341 extraLinkFlags extraRustcOptsForBuildRs 342 crateAuthors crateHomepage verbose colors codegenUnits; 343 };
··· 235 "edition" 236 "buildTests" 237 "codegenUnits" 238 + "links" 239 ]; 240 extraDerivationAttrs = builtins.removeAttrs crate processedAttrs; 241 nativeBuildInputs_ = nativeBuildInputs; ··· 318 crateDescription = crate.description or ""; 319 crateAuthors = if crate ? authors && lib.isList crate.authors then crate.authors else [ ]; 320 crateHomepage = crate.homepage or ""; 321 + crateLinks = crate.links or ""; 322 crateType = 323 if lib.attrByPath [ "procMacro" ] false crate then [ "proc-macro" ] else 324 if lib.attrByPath [ "plugin" ] false crate then [ "dylib" ] else ··· 339 340 configurePhase = configureCrate { 341 inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription 342 + crateFeatures crateRenames libName build workspace_member release libPath crateVersion crateLinks 343 extraLinkFlags extraRustcOptsForBuildRs 344 crateAuthors crateHomepage verbose colors codegenUnits; 345 };