diff --git a/lib.nix b/lib.nix index 449b2da..d9c74e7 100644 --- a/lib.nix +++ b/lib.nix @@ -1,8 +1,7 @@ { pkgs }: let inherit (pkgs) lib; - pwd = builtins.getEnv "PWD"; - runtime = "${pwd}/.compose"; + runtime = ".compose"; in { mkWrapper = @@ -142,11 +141,12 @@ in script = pkgs.writeShellApplication { name = "run-postgres"; text = '' - set -euo pipefail - export PGDATA=${data_dir} PGHOST=${runtimeDir} PGPORT=${builtins.toString port} - mkdir -p ${lib.escapeShellArg runtimeDir} - ${setupScript}/bin/setup-postgres - exec ${package}/bin/postgres + set -euo pipefail + export PGDATA=${data_dir} PGHOST=${runtimeDir} PGPORT=${builtins.toString port} + pwd + mkdir -p ${lib.escapeShellArg runtimeDir} + ${setupScript}/bin/setup-postgres + exec ${package}/bin/postgres ''; }; in