Merge pull request #41098 from mkaito/oauth2_proxy

oauth2_proxy: Handle attributes being derivations
This commit is contained in:
Yegor Timoshenko 2018-06-18 20:47:55 +03:00 committed by GitHub
commit 5e5bdfa6ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,6 +72,7 @@ let
mapConfig = key: attr: mapConfig = key: attr:
if (!isNull attr && attr != []) then ( if (!isNull attr && attr != []) then (
if isDerivation attr then mapConfig key (toString attr) else
if (builtins.typeOf attr) == "set" then concatStringsSep " " if (builtins.typeOf attr) == "set" then concatStringsSep " "
(mapAttrsToList (name: value: mapConfig (key + "-" + name) value) attr) else (mapAttrsToList (name: value: mapConfig (key + "-" + name) value) attr) else
if (builtins.typeOf attr) == "list" then concatMapStringsSep " " (mapConfig key) attr else if (builtins.typeOf attr) == "list" then concatMapStringsSep " " (mapConfig key) attr else