flake: { pkgs , tools ? [] , envVars ? {} , prePrompt ? "" , shell ? null }: let shellLib = flake.lib.shell { inherit pkgs; }; in pkgs.mkShell { packages = tools; shellHook = '' ${shellLib.exportEnvVars envVars} ${shellLib.ifSomeAttrs envVars shellLib.printEnvVars} ${shellLib.ifSomeList tools shellLib.printBins} echo ${prePrompt} ${if (shell != null) then shell else shellLib.startUserShell} exit $? ''; }