fix(rust): filter out more attributes from devshells, fixes devshell build

This commit is contained in:
Yusuf Bera Ertan 2023-02-21 18:12:24 +03:00
parent 74d74154e0
commit db72710500
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA

View File

@ -13,15 +13,17 @@
# illegal env names to be removed and not be added to the devshell
illegalEnvNames =
[
"src"
"name"
"pname"
"version"
"all"
"args"
"drvPath"
"drvAttrs"
"outPath"
"stdenv"
"builder"
"outputs"
"phases"
# cargo artifact and vendoring derivations
# we don't need these in the devshell
"cargoArtifacts"
"dream2nixVendorDir"
"cargoVendorDir"
@ -54,12 +56,16 @@
combineEnvs = envs:
l.foldl'
(
all: env:
all: env: let
mergeInputs = name: (all.${name} or []) ++ (env.${name} or []);
in
all
// env
// {
buildInputs = (all.buildInputs or []) ++ (env.buildInputs or []);
nativeBuildInputs = (all.nativeBuildInputs or []) ++ (env.nativeBuildInputs or []);
buildInputs = mergeInputs "buildInputs";
nativeBuildInputs = mergeInputs "nativeBuildInputs";
propagatedBuildInputs = mergeInputs "propagatedBuildInputs";
propagatedNativeBuildInputs = mergeInputs "propagatedNativeBuildInputs";
}
)
{}