try fix script
This commit is contained in:
14
lib.nix
14
lib.nix
@@ -1,8 +1,7 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
let
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
pwd = builtins.getEnv "PWD";
|
runtime = ".compose";
|
||||||
runtime = "${pwd}/.compose";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
mkWrapper =
|
mkWrapper =
|
||||||
@@ -142,11 +141,12 @@ in
|
|||||||
script = pkgs.writeShellApplication {
|
script = pkgs.writeShellApplication {
|
||||||
name = "run-postgres";
|
name = "run-postgres";
|
||||||
text = ''
|
text = ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
export PGDATA=${data_dir} PGHOST=${runtimeDir} PGPORT=${builtins.toString port}
|
export PGDATA=${data_dir} PGHOST=${runtimeDir} PGPORT=${builtins.toString port}
|
||||||
mkdir -p ${lib.escapeShellArg runtimeDir}
|
pwd
|
||||||
${setupScript}/bin/setup-postgres
|
mkdir -p ${lib.escapeShellArg runtimeDir}
|
||||||
exec ${package}/bin/postgres
|
${setupScript}/bin/setup-postgres
|
||||||
|
exec ${package}/bin/postgres
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|||||||
Reference in New Issue
Block a user