makeWrapper: throw if there's no targetPackages.runtimeShell

This commit is contained in:
Artturin 2022-12-22 21:06:23 +02:00
parent d9be3f9a0a
commit 065b54ffab

View File

@ -971,7 +971,8 @@ with pkgs;
makeShellWrapper = makeSetupHook makeShellWrapper = makeSetupHook
{ deps = [ dieHook ]; { deps = [ dieHook ];
substitutions = { substitutions = {
shell = targetPackages.runtimeShell; # targetPackages.runtimeShell only exists when pkgs == targetPackages (when targetPackages is not __raw)
shell = if targetPackages ? runtimeShell then targetPackages.runtimeShell else throw "makeWrapper/makeShellWrapper must be in nativeBuildInputs";
}; };
passthru = { passthru = {
tests = tests.makeWrapper; tests = tests.makeWrapper;