From 02a5c39319eeeb25c179a731230357b0ae1ee726 Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 12 Feb 2021 13:18:04 +0100 Subject: [PATCH] Remove PostreSQL database from shell.nix --- shell.nix | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/shell.nix b/shell.nix index 12d1637..49c9055 100644 --- a/shell.nix +++ b/shell.nix @@ -2,30 +2,10 @@ with pkgs; -let - sql_file = "psql_creation.sql"; - data_dir = "$(pwd)/.pgdata"; - origin = "databases/odyfo.db"; - -in mkShell { - buildInputs = [ postgresql python27 python27Packages.virtualenv ]; +mkShell { + buildInputs = [ python27 python27Packages.virtualenv ]; shellHook = '' - trap "kill 0" EXIT - export PGDATA="${data_dir}" - export PGHOST="${data_dir}" - - if [ ! -d ${data_dir} ]; then - initdb --auth-local=trust --no-locale --encoding=UTF8 - fi - - if ! pg_ctl status; then - pg_ctl start -o "--unix_socket_directories=${data_dir} --listen_addresses='''" - fi - - alias psql='psql -d postgres' - alias nuke='rm -rf ${data_dir}' - # Workaround to use pip SOURCE_DATE_EPOCH=$(date +%s) virtualenv .venv