mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
Merge pull request #79816 from andir/buildRustCrate-no-override-dep
buildRustCrate: remove superfluous dependency overrides
This commit is contained in:
commit
453589696b
@ -62,9 +62,6 @@ let crate = crate_ // (lib.attrByPath [ crate_.crateName ] (attr: {}) crateOverr
|
|||||||
extraRustcOpts_ = extraRustcOpts;
|
extraRustcOpts_ = extraRustcOpts;
|
||||||
buildTests_ = buildTests;
|
buildTests_ = buildTests;
|
||||||
|
|
||||||
# take a list of crates that we depend on and override them to fit our overrides, rustc, release, …
|
|
||||||
makeDependencies = map (dep: lib.getLib (dep.override { inherit release verbose crateOverrides; }));
|
|
||||||
|
|
||||||
# crate2nix has a hack for the old bash based build script that did split
|
# crate2nix has a hack for the old bash based build script that did split
|
||||||
# entries at `,`. No we have to work around that hack.
|
# entries at `,`. No we have to work around that hack.
|
||||||
# https://github.com/kolloch/crate2nix/blame/5b19c1b14e1b0e5522c3e44e300d0b332dc939e7/crate2nix/templates/build.nix.tera#L89
|
# https://github.com/kolloch/crate2nix/blame/5b19c1b14e1b0e5522c3e44e300d0b332dc939e7/crate2nix/templates/build.nix.tera#L89
|
||||||
@ -93,8 +90,8 @@ stdenv.mkDerivation (rec {
|
|||||||
name = "rust_${crate.crateName}-${crate.version}${lib.optionalString buildTests_ "-test"}";
|
name = "rust_${crate.crateName}-${crate.version}${lib.optionalString buildTests_ "-test"}";
|
||||||
depsBuildBuild = [ rust stdenv.cc ];
|
depsBuildBuild = [ rust stdenv.cc ];
|
||||||
buildInputs = (crate.buildInputs or []) ++ buildInputs_;
|
buildInputs = (crate.buildInputs or []) ++ buildInputs_;
|
||||||
dependencies = makeDependencies dependencies_;
|
dependencies = map lib.getLib dependencies_;
|
||||||
buildDependencies = makeDependencies buildDependencies_;
|
buildDependencies = map lib.getLib buildDependencies_;
|
||||||
|
|
||||||
completeDeps = lib.unique (dependencies ++ lib.concatMap (dep: dep.completeDeps) dependencies);
|
completeDeps = lib.unique (dependencies ++ lib.concatMap (dep: dep.completeDeps) dependencies);
|
||||||
completeBuildDeps = lib.unique (
|
completeBuildDeps = lib.unique (
|
||||||
|
Loading…
Reference in New Issue
Block a user