update check

This commit is contained in:
2025-03-16 00:14:07 +04:00
parent 9efbbbacdf
commit 6858834b20

16
lib.nix
View File

@@ -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