Plugin dir attribute can also be a path.

This commit is contained in:
Kevin Baensch 2024-05-18 11:18:36 +02:00
parent b83e5c9de5
commit 8dd643ceeb
Signed by: derped
GPG key ID: C0F1D326C7626543

View file

@ -30,7 +30,11 @@ let
baseNameOf plugin.short baseNameOf plugin.short
else if (plugin ? dir && plugin.dir != null) then else if (plugin ? dir && plugin.dir != null) then
( (
assert ((builtins.isString plugin.dir) || (lib.isDerivation plugin.dir)); assert builtins.any (isType: isType plugin.dir) [
lib.isDerivation
builtins.isString
builtins.isPath
];
if (lib.isDerivation plugin.dir) then plugin.dir.pname else (baseNameOf plugin.dir) if (lib.isDerivation plugin.dir) then plugin.dir.pname else (baseNameOf plugin.dir)
) )
else else