kdePackages.mkKdeDerivation: allow excluding upstream specified dependencies

This commit is contained in:
K900 2024-03-24 10:25:06 +03:00
parent ddd523bd82
commit ca9b89bd3a

View file

@ -78,11 +78,15 @@ in
extraNativeBuildInputs ? [], extraNativeBuildInputs ? [],
extraPropagatedBuildInputs ? [], extraPropagatedBuildInputs ? [],
extraCmakeFlags ? [], extraCmakeFlags ? [],
excludeDependencies ? [],
... ...
} @ args: let } @ args: let
depNames = dependencies.${pname} or [];
filteredDepNames = builtins.filter (dep: !(builtins.elem dep excludeDependencies)) depNames;
# FIXME(later): this is wrong for cross, some of these things really need to go into nativeBuildInputs, # FIXME(later): this is wrong for cross, some of these things really need to go into nativeBuildInputs,
# but cross is currently very broken anyway, so we can figure this out later. # but cross is currently very broken anyway, so we can figure this out later.
deps = map (dep: self.${dep}) (dependencies.${pname} or []); deps = map (dep: self.${dep}) filteredDepNames;
defaultArgs = { defaultArgs = {
inherit version src; inherit version src;
@ -109,6 +113,7 @@ in
"extraNativeBuildInputs" "extraNativeBuildInputs"
"extraPropagatedBuildInputs" "extraPropagatedBuildInputs"
"extraCmakeFlags" "extraCmakeFlags"
"excludeDependencies"
"meta" "meta"
]; ];