try fix script

This commit is contained in:
2025-03-17 12:48:50 +04:00
parent 3db3606686
commit 883acbe6d4
2 changed files with 4 additions and 5 deletions

View File

@@ -5,8 +5,7 @@
outputs = _: {
lib = {
mkLib = pkgs: pwd: import ./lib.nix { inherit pkgs pwd; };
mkLib = pkgs: import ./lib.nix { inherit pkgs; };
};
};
}

View File

@@ -1,7 +1,7 @@
{ pkgs, pwd }:
let
inherit (pkgs) lib;
runtime = builtins.toString pwd + "/.compose";
runtime = ".compose";
in
{
mkWrapper =
@@ -122,7 +122,7 @@ in
echo "PostgreSQL initdb process completed"
echo
fi
cp ${configFile} ${data_dir}/postgresql.conf
cp ${configFile} $PGDATA/postgresql.conf
if [[ "$POSTGRES_RUN_INITIAL_SCRIPT" == "true" ]]; then
echo
echo "PostgreSQL is setting up the initial database"
@@ -142,7 +142,7 @@ in
name = "run-postgres";
text = ''
set -euo pipefail
export PGDATA=${data_dir} PGHOST=${runtimeDir} PGPORT=${builtins.toString port}
export PGDATA=$(realpath ${data_dir}) PGHOST=$(realpath (${runtimeDir}) PGPORT=${builtins.toString port}
mkdir -p ${lib.escapeShellArg runtimeDir}
${setupScript}/bin/setup-postgres
${package}/bin/postgres