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