nixos: throw an error on invalid shell package

All shell packages must export the shellPath passthru
This commit is contained in:
zimbatm 2016-07-04 15:10:51 +01:00
parent c1a202de05
commit 6df0bff908

View File

@ -12,6 +12,8 @@ rec {
toShellPath = shell:
if types.shellPackage.check shell then
"/run/current-system/sw${shell.shellPath}"
else if types.package.check shell then
throw "${shell} is not a shell package"
else
shell;
}