Unverified Commit 03ceb367 authored by Emil "AngryAnt" Johansen's avatar Emil "AngryAnt" Johansen
Browse files

lib.toPlist: support for path values

parent a1c45f32
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -355,6 +355,7 @@ rec {
  # PLIST handling
  toPlist = {}: v: let
    isFloat = builtins.isFloat or (x: false);
    isPath = x: builtins.typeOf x == "path";
    expr = ind: x:  with builtins;
      if x == null  then "" else
      if isBool x   then bool ind x else
@@ -362,6 +363,7 @@ rec {
      if isString x then str ind x else
      if isList x   then list ind x else
      if isAttrs x  then attrs ind x else
      if isPath x   then str ind (toString x) else
      if isFloat x  then float ind x else
      abort "generators.toPlist: should never happen (v = ${v})";