Fix build when using nix & minor cleanup
This commit is contained in:
parent
7209b69859
commit
1d8e10566e
10
shell.nix
10
shell.nix
@ -13,6 +13,8 @@ let
|
||||
CREATE USER uniworx;
|
||||
CREATE DATABASE uniworx_test;
|
||||
GRANT ALL ON DATABASE uniworx_test TO uniworx;
|
||||
CREATE DATABASE uniworx;
|
||||
GRANT ALL ON DATABASE uniworx TO uniworx;
|
||||
'';
|
||||
|
||||
postgresHba = pkgs.writeText "hba_file" ''
|
||||
@ -33,16 +35,12 @@ let
|
||||
export PGHOST=''${pgSockDir} PGLOG=''${pgLogFile}
|
||||
psql -f ${postgresSchema} postgres
|
||||
printf "Postgres logfile is %s\nPostgres socket directory is %s\n" ''${pgLogFile} ''${pgSockDir}
|
||||
cat > .dbsettings.yml <<EOF
|
||||
database:
|
||||
host: ''${pgSockDir}
|
||||
EOF
|
||||
|
||||
zsh
|
||||
env --unset=shellHook zsh
|
||||
ret=$?
|
||||
|
||||
pg_ctl stop -D ''${pgDir}
|
||||
rm -rvf .dbsettings.yml ''${pgDir} ''${pgSockDir} ''${pgLogFile}
|
||||
rm -rvf ''${pgDir} ''${pgSockDir} ''${pgLogFile}
|
||||
exit ''${ret}
|
||||
'';
|
||||
};
|
||||
|
||||
@ -133,7 +133,7 @@ getApplicationDev = do
|
||||
return (wsettings, app)
|
||||
|
||||
getAppDevSettings :: IO AppSettings
|
||||
getAppDevSettings = loadYamlSettings ["config/settings.yml", "config/test-settings.yml", configSettingsYml] [configSettingsYmlValue] useEnv
|
||||
getAppDevSettings = loadYamlSettings [configSettingsYml] [configSettingsYmlValue] useEnv
|
||||
|
||||
-- | main function for use by yesod devel
|
||||
develMain :: IO ()
|
||||
|
||||
@ -68,3 +68,4 @@ extra-package-dbs: []
|
||||
nix:
|
||||
packages: []
|
||||
shell-file: ./stack.nix
|
||||
pure: false
|
||||
|
||||
@ -40,7 +40,7 @@ runHandler handler = do
|
||||
withApp :: SpecWith (TestApp UniWorX) -> Spec
|
||||
withApp = before $ do
|
||||
settings <- loadYamlSettings
|
||||
[".dbsettings.yml", "config/test-settings.yml", "config/settings.yml"]
|
||||
["config/test-settings.yml", "config/settings.yml"]
|
||||
[]
|
||||
useEnv
|
||||
foundation <- makeFoundation settings
|
||||
|
||||
Loading…
Reference in New Issue
Block a user