nixos: throw an error on invalid shell package
All shell packages must export the shellPath passthru
This commit is contained in:
parent
c1a202de05
commit
6df0bff908
@ -12,6 +12,8 @@ rec {
|
|||||||
toShellPath = shell:
|
toShellPath = shell:
|
||||||
if types.shellPackage.check shell then
|
if types.shellPackage.check shell then
|
||||||
"/run/current-system/sw${shell.shellPath}"
|
"/run/current-system/sw${shell.shellPath}"
|
||||||
|
else if types.package.check shell then
|
||||||
|
throw "${shell} is not a shell package"
|
||||||
else
|
else
|
||||||
shell;
|
shell;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user