mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
Merge pull request #238385 from NixOS/revert-237848-build-rust
This commit is contained in:
commit
f70fcb34ec
@ -7,7 +7,7 @@
|
|||||||
dependencies,
|
dependencies,
|
||||||
crateFeatures, crateRenames, libName, release, libPath,
|
crateFeatures, crateRenames, libName, release, libPath,
|
||||||
crateType, metadata, crateBin, hasCrateBin,
|
crateType, metadata, crateBin, hasCrateBin,
|
||||||
extraRustcOpts,
|
extraRustcOpts, verbose, colors,
|
||||||
buildTests,
|
buildTests,
|
||||||
codegenUnits
|
codegenUnits
|
||||||
}:
|
}:
|
||||||
@ -40,7 +40,9 @@
|
|||||||
++ (map (x: "--crate-type ${x}") crateType)
|
++ (map (x: "--crate-type ${x}") crateType)
|
||||||
);
|
);
|
||||||
|
|
||||||
binRustcOpts = lib.concatStringsSep " " baseRustcOpts;
|
binRustcOpts = lib.concatStringsSep " " (
|
||||||
|
baseRustcOpts
|
||||||
|
);
|
||||||
|
|
||||||
build_bin = if buildTests then "build_bin_test" else "build_bin";
|
build_bin = if buildTests then "build_bin_test" else "build_bin";
|
||||||
in ''
|
in ''
|
||||||
|
@ -300,7 +300,7 @@ crate_: lib.makeOverridable
|
|||||||
(crate.features ++ features)
|
(crate.features ++ features)
|
||||||
);
|
);
|
||||||
|
|
||||||
libName = crate.libName or crate.crateName;
|
libName = if crate ? libName then crate.libName else crate.crateName;
|
||||||
libPath = lib.optionalString (crate ? libPath) crate.libPath;
|
libPath = lib.optionalString (crate ? libPath) crate.libPath;
|
||||||
|
|
||||||
# Seed the symbol hashes with something unique every time.
|
# Seed the symbol hashes with something unique every time.
|
||||||
@ -329,7 +329,7 @@ crate_: lib.makeOverridable
|
|||||||
colors = lib.attrByPath [ "colors" ] "always" crate;
|
colors = lib.attrByPath [ "colors" ] "always" crate;
|
||||||
extraLinkFlags = lib.concatStringsSep " " (crate.extraLinkFlags or [ ]);
|
extraLinkFlags = lib.concatStringsSep " " (crate.extraLinkFlags or [ ]);
|
||||||
edition = crate.edition or null;
|
edition = crate.edition or null;
|
||||||
codegenUnits = crate.codegenUnits or 1;
|
codegenUnits = if crate ? codegenUnits then crate.codegenUnits else 1;
|
||||||
extraRustcOpts =
|
extraRustcOpts =
|
||||||
lib.optionals (crate ? extraRustcOpts) crate.extraRustcOpts
|
lib.optionals (crate ? extraRustcOpts) crate.extraRustcOpts
|
||||||
++ extraRustcOpts_
|
++ extraRustcOpts_
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
, buildInputs ? []
|
, buildInputs ? []
|
||||||
, nativeBuildInputs ? []
|
, nativeBuildInputs ? []
|
||||||
, cargoUpdateHook ? ""
|
, cargoUpdateHook ? ""
|
||||||
|
, cargoDepsHook ? ""
|
||||||
, buildType ? "release"
|
, buildType ? "release"
|
||||||
, meta ? {}
|
, meta ? {}
|
||||||
, cargoLock ? null
|
, cargoLock ? null
|
||||||
|
Loading…
Reference in New Issue
Block a user