summary refs log tree commit diff
path: root/lib/types.nix
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2016-06-12 20:03:14 +0100
committerzimbatm <zimbatm@zimbatm.com>2016-06-12 20:35:34 +0100
commit2974b6f4c8224ab1097e9386d6b3a0d570f95531 (patch)
tree5e096917408ec3b8099685c0db35fa372914d01e /lib/types.nix
parente2413ad5a8b6a80e5552306518fdf16e68b6c6d7 (diff)
downloadnixlib-2974b6f4c8224ab1097e9386d6b3a0d570f95531.tar
nixlib-2974b6f4c8224ab1097e9386d6b3a0d570f95531.tar.gz
nixlib-2974b6f4c8224ab1097e9386d6b3a0d570f95531.tar.bz2
nixlib-2974b6f4c8224ab1097e9386d6b3a0d570f95531.tar.lz
nixlib-2974b6f4c8224ab1097e9386d6b3a0d570f95531.tar.xz
nixlib-2974b6f4c8224ab1097e9386d6b3a0d570f95531.tar.zst
nixlib-2974b6f4c8224ab1097e9386d6b3a0d570f95531.zip
Use shell packages to select the user's shell
The string type is still available for backward-compatiblity.
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 91b39f3a9cf8..83f624e6b448 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.