Allow devShells to be directly set to derivations

This commit is contained in:
Archit Gupta
2024-02-25 18:40:05 -08:00
parent 610cc3b0c4
commit 360fd2099d
3 changed files with 24 additions and 8 deletions

View File

@ -47,10 +47,13 @@ let
let val = pkgs.callPackage fn { }; in
if (functionArgs fn == { }) || !(package.check val)
then fn pkgs
else { overrideShell = val; };
else val;
packageOverride = p: { overrideShell = p; };
devShellType = coercedTo function wrapFn
(optFunctionTo (submodule devShellModule));
(optFunctionTo (coercedTo package packageOverride
(submodule devShellModule)));
genDevShell = pkgs: cfg:
if cfg.overrideShell != null then cfg.overrideShell