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
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue