aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-05-07 22:03:57 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-05-07 22:03:57 +0300
commitc0904ce43e599828a407e22a49b9194a4fdff079 (patch)
tree16bcc3953c8fe0e4d88caf9cc56e4c2666d61ed7 /modules
parent8fb2f14c1ea4cfeabba8f7a831e8fdd3cc78c6fb (diff)
downloadnixsap-c0904ce43e599828a407e22a49b9194a4fdff079.tar.gz
sproxy2: fix `datafile` option processing
`datafile` is usually a derivation (a set at the very basic nix level), so it wasn't processed as a string, but rather as a fallback case "toString v". Other option is to use `lib.isDerivation`.
Diffstat (limited to 'modules')
-rw-r--r--modules/apps/sproxy2.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/apps/sproxy2.nix b/modules/apps/sproxy2.nix
index 7786327..8616a48 100644
--- a/modules/apps/sproxy2.nix
+++ b/modules/apps/sproxy2.nix
@@ -2,7 +2,7 @@
let
- inherit (builtins) elem isBool isString;
+ inherit (builtins) elem isBool isInt isString;
inherit (lib)
concatMapStringsSep concatStringsSep filterAttrs imap
mapAttrsToList mkIf mkOption optionalString ;
@@ -24,9 +24,9 @@ let
show = v:
if v ? file then "!include '${v.file}'"
- else if isString v then "'${v}'"
+ else if isInt v then "${toString v}"
else if isBool v then (if v then "true" else "false")
- else toString v;
+ else "'${v}'";
top = concatMapAttrsSep "\n" (k: v: "${k}: ${show v}")
(filterAttrs (n: _: