mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 05:29:20 +03:00
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:
|
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…
Add table
Add a link
Reference in a new issue