mkShell: exclude inputsFrom from merged inputs (#137005)
The motivation for inputsFrom is to create a shell environment that is suitable for development of the packages listed in inputsFrom. This commit filters out any dependencies from one package in inputsFrom to another when computing the shell environment's inputs. This supports the use case where several closely related packages (perhaps even built from the same source tree) are being mutually developed. It is assumed that the user will configure their environment to resolve dependencies between these mutually developed packages.
This commit is contained in:
parent
5a65943b93
commit
087513bc11
1 changed files with 3 additions and 2 deletions
|
@ -14,8 +14,9 @@
|
|||
, ...
|
||||
}@attrs:
|
||||
let
|
||||
mergeInputs = name: lib.concatLists (lib.catAttrs name
|
||||
([ attrs ] ++ inputsFrom));
|
||||
mergeInputs = name:
|
||||
(attrs.${name} or []) ++
|
||||
(lib.subtractLists inputsFrom (lib.catAttrs name inputsFrom));
|
||||
|
||||
rest = builtins.removeAttrs attrs [
|
||||
"packages"
|
||||
|
|
Loading…
Reference in a new issue