about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/licenses.nix5
-rw-r--r--lib/trivial.nix5
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/licenses.nix b/lib/licenses.nix
index 4d4a3c1a9544..000a55224ea7 100644
--- a/lib/licenses.nix
+++ b/lib/licenses.nix
@@ -357,6 +357,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
     fullName = "Lucent Public License v1.02";
   };
 
+  miros = {
+    fullname = "MirOS License";
+    url = https://opensource.org/licenses/MirOS;
+  };
+
   # spdx.org does not (yet) differentiate between the X11 and Expat versions
   # for details see http://en.wikipedia.org/wiki/MIT_License#Various_versions
   mit = spdx {
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: