gimp-with-plugins: Use consistent GIMP version

In case `gimp` attribute from `gimpPlugins` scope is overridden to something different than the top-level one.
This commit is contained in:
Jan Tojnar 2023-03-17 14:53:51 +01:00
parent 94f5d6e5c2
commit 29638c4a7e

View File

@ -1,8 +1,9 @@
{ lib, symlinkJoin, gimp, makeWrapper, gimpPlugins, gnome, plugins ? null}:
{ lib, symlinkJoin, makeWrapper, gimpPlugins, gnome, plugins ? null}:
let
inherit (gimpPlugins) gimp;
allPlugins = lib.filter (pkg: lib.isDerivation pkg && !pkg.meta.broken or false) (lib.attrValues gimpPlugins);
selectedPlugins = lib.filter (pkg: pkg != gimpPlugins.gimp) (if plugins == null then allPlugins else plugins);
selectedPlugins = lib.filter (pkg: pkg != gimp) (if plugins == null then allPlugins else plugins);
extraArgs = map (x: x.wrapArgs or "") selectedPlugins;
versionBranch = lib.versions.majorMinor gimp.version;