From 6df0bff9085d8067a123be5f0f435ad7bbed6d25 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Mon, 4 Jul 2016 15:10:51 +0100 Subject: [PATCH] nixos: throw an error on invalid shell package All shell packages must export the shellPath passthru --- nixos/lib/utils.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index 871fbb121d03..40d0854d968d 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -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; }