summary refs log tree commit diff
path: root/lib/types.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/types.nix')
-rw-r--r--lib/types.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/types.nix b/lib/types.nix
index 91b39f3a9cf..83f624e6b44 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -100,6 +100,10 @@ rec {
         in if isDerivation res then res else toDerivation res;
     };
 
+    shellPackage = package // {
+      check = x: (package.check x) && (hasAttr "shellPath" x);
+    };
+
     path = mkOptionType {
       name = "path";
       # Hacky: there is no ‘isPath’ primop.