Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Conditionally link devenv profile for python-rewrite #847

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/modules/services/postgres.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ let
echo "PostgreSQL is setting up the initial database."
echo
OLDPGHOST="$PGHOST"
PGHOST="$DEVENV_STATE/$(mktemp -d "pg-init-XXXXXX")"
mkdir -p "$PGHOST"
PGHOST=$(mktemp -d "$DEVENV_STATE/pg-init-XXXXXX")

function remove_tmp_pg_init_sock_dir() {
if [[ -d "$1" ]]; then
Expand Down
6 changes: 4 additions & 2 deletions src/modules/top-level.nix
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ in
fi

mkdir -p .devenv
rm -f .devenv/profile
ln -s ${profile} .devenv/profile
if [ ! -L .devenv/profile ] || [ "$(${pkgs.coreutils}/bin/readlink .devenv/profile)" != "${profile}" ]
then
ln -nsf ${profile} .devenv/profile
fi
unset ${lib.concatStringsSep " " config.unsetEnvVars}
'';

Expand Down