From c0904ce43e599828a407e22a49b9194a4fdff079 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sun, 7 May 2017 22:03:57 +0300 Subject: 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`. --- modules/apps/sproxy2.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/apps') 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: _: -- cgit v1.2.3