diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2017-04-11 18:08:51 +0200 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2017-04-11 18:18:53 +0200 |
commit | 3ab45f4b369c9c741b55ddedeaac4c797dc61c04 (patch) | |
tree | 3c5e330622e42066e50ab20a6c58b9251addf863 /lib | |
parent | 54fff9ec1a9e7425926eadffada0268351536926 (diff) |
treewide: use boolToString function
Diffstat (limited to 'lib')
-rw-r--r-- | lib/trivial.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix index acbd687dd98f..62906339e605 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -30,6 +30,11 @@ rec { /* boolean “and” */ and = x: y: x && y; + /* Convert a boolean to a string. + Note that toString on a bool returns "1" and "". + */ + boolToString = b: if b then "true" else "false"; + /* Merge two attribute sets shallowly, right side trumps left Example: |