From 065b54ffabce9826506913887be1fc33e1a96f66 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 22 Dec 2022 21:06:23 +0200 Subject: [PATCH] makeWrapper: throw if there's no targetPackages.runtimeShell --- pkgs/top-level/all-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a8e4e17ac52e..3a9b3bc2c7ac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -971,7 +971,8 @@ with pkgs; makeShellWrapper = makeSetupHook { deps = [ dieHook ]; 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 = { tests = tests.makeWrapper;