diff options
author | Shea Levy <shea@shealevy.com> | 2013-05-02 14:03:43 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2013-05-02 14:03:43 -0400 |
commit | 2742087bdd092d77083dc99cdafb6e93444fba3e (patch) | |
tree | 18c75048808fcb49baa59c46b9e6d4b049178bc9 /pkgs/lib/trivial.nix | |
parent | 318b7e2eeb092c37688c3bdf09e70b7683dad11d (diff) | |
download | nixlib-2742087bdd092d77083dc99cdafb6e93444fba3e.tar nixlib-2742087bdd092d77083dc99cdafb6e93444fba3e.tar.gz nixlib-2742087bdd092d77083dc99cdafb6e93444fba3e.tar.bz2 nixlib-2742087bdd092d77083dc99cdafb6e93444fba3e.tar.lz nixlib-2742087bdd092d77083dc99cdafb6e93444fba3e.tar.xz nixlib-2742087bdd092d77083dc99cdafb6e93444fba3e.tar.zst nixlib-2742087bdd092d77083dc99cdafb6e93444fba3e.zip |
Add isPath to trivial.nix
Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'pkgs/lib/trivial.nix')
-rw-r--r-- | pkgs/lib/trivial.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/lib/trivial.nix b/pkgs/lib/trivial.nix index 8af3474f2a67..b2304ff7a17e 100644 --- a/pkgs/lib/trivial.nix +++ b/pkgs/lib/trivial.nix @@ -35,4 +35,14 @@ rec { else if builtins.isAttrs x then deepSeqAttrs x y else seq x y; + + isPath = val: with builtins; !( + isAttrs val + || isList val + || isInt val + || isString val + || isFunction val + || isBool val + || val == null + ); } |