vapoursynth: improve plugin dependency resolution

Some python packages (e.g. functools32) are conditionally disabled for
certain interpreter versions by having them return null instead of a
derivation. `getRecursivePropagatedBuildInputs` fails if such a package
is part of the dependency tree. This commit makes it only recurse into
derivations and ignore everything else.

This also deduplicates the final plugin list to improve startup time.
This commit is contained in:
Simon Bruder 2021-05-16 16:42:44 +02:00
parent c58b97674b
commit 9b3a2e66b1
No known key found for this signature in database
GPG key ID: 8D3C82F9F309F8EC

View file

@ -8,10 +8,11 @@ plugins: let
getRecursivePropagatedBuildInputs = pkgs: lib.flatten
(map
(pkg: pkg.propagatedBuildInputs ++ (getRecursivePropagatedBuildInputs pkg.propagatedBuildInputs))
(pkg: let cleanPropagatedBuildInputs = lib.filter lib.isDerivation pkg.propagatedBuildInputs;
in cleanPropagatedBuildInputs ++ (getRecursivePropagatedBuildInputs cleanPropagatedBuildInputs))
pkgs);
deepPlugins = plugins ++ (getRecursivePropagatedBuildInputs plugins);
deepPlugins = lib.unique (plugins ++ (getRecursivePropagatedBuildInputs plugins));
pluginsEnv = buildEnv {
name = "vapoursynth-plugins-env";