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:
Geoff Reedy 2021-09-08 05:53:09 -06:00 committed by GitHub
parent 5a65943b93
commit 087513bc11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"