update check
This commit is contained in:
16
lib.nix
16
lib.nix
@@ -50,7 +50,9 @@ in
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
inherit name;
|
||||
text = checks ++ ''
|
||||
text =
|
||||
checks
|
||||
+ ''
|
||||
PC_CONFIG_FILES=${configFile} ${pkgs.process-compose}/bin/process-compose "$@"
|
||||
|
||||
'';
|
||||
@@ -87,17 +89,17 @@ in
|
||||
else if false == value then
|
||||
"no"
|
||||
else if lib.isString value then
|
||||
"'${lib.replaceStrings [ "'" ] [ "''" value ]}'"
|
||||
"'${lib.replaceStrings [ "'" ] [ "''" ] value}'"
|
||||
else
|
||||
builtins.toString value;
|
||||
configFile = pkgs.writeTextDir "postgresql.conf" (
|
||||
lib.concatStringSep "\n" (
|
||||
lib.mapAttrsToList (n: v: "${n} = ${toStr v}") (lib.filterAttrs (
|
||||
lib.const (x: x != null)
|
||||
)) merged_config
|
||||
lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (n: v: "${n} = ${toStr v}") (
|
||||
lib.filterAttrs (lib.const (x: x != null)) merged_config
|
||||
)
|
||||
)
|
||||
);
|
||||
configFileCheck = pkgs.writeShellScript {
|
||||
configFileCheck = pkgs.writeShellApplication {
|
||||
name = "check";
|
||||
text = ''
|
||||
${package}/bin/postgres -D${configFile} -C config_file
|
||||
|
||||
Reference in New Issue
Block a user