-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix rust and haskell build for release
- Loading branch information
Andika Demas Riyandi
committed
Dec 16, 2020
1 parent
65e5276
commit f532df7
Showing
26 changed files
with
2,763 additions
and
2,094 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
with-compiler: ghc | ||
packages: | ||
backend/ | ||
frontend/ | ||
common/ | ||
tests: false | ||
benchmarks: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ pkgs }: | ||
{ | ||
pgutil = pkgs.callPackage ./pgutil.nix {}; | ||
migrate = pkgs.callPackage ./migrate.nix {}; | ||
pgutil = pkgs.callPackage ./pgutil.nix { }; | ||
migrate = pkgs.callPackage ./migrate.nix { }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
{ writeScript, stdenv }: | ||
# 1. Change .pgdata location to $HOME/.pgdata to anticipate permission error | ||
{ | ||
start_pg = writeScript "start-pg" | ||
'' | ||
#!${stdenv.shell} | ||
pg_pid="" | ||
set -euo pipefail | ||
# TODO: explain what's happening here | ||
LOCAL_PGHOST=$PGHOST | ||
LOCAL_PGPORT=$PGPORT | ||
LOCAL_PGDATABASE=$PGDATABASE | ||
LOCAL_PGUSER=$PGUSER | ||
LOCAL_PGPASSWORD=$PGPASSWORD | ||
unset PGUSER PGPASSWORD | ||
# TODO: port | ||
pg_ctl -D "$HOME/.pgdata" -w start || (echo pg_ctl failed; exit 1) | ||
until psql postgres -c "SELECT 1" > /dev/null 2>&1 ; do | ||
echo waiting for pg | ||
sleep 0.5 | ||
done | ||
''; | ||
init_pg = writeScript "init-pg" | ||
'' | ||
#!${stdenv.shell} | ||
pg_pid="" | ||
set -euo pipefail | ||
# TODO: explain what's happening here | ||
LOCAL_PGHOST=$PGHOST | ||
LOCAL_PGPORT=$PGPORT | ||
LOCAL_PGDATABASE=$PGDATABASE | ||
LOCAL_PGUSER=$PGUSER | ||
LOCAL_PGPASSWORD=$PGPASSWORD | ||
unset PGUSER PGPASSWORD | ||
initdb -D $HOME/.pgdata | ||
echo "unix_socket_directories = '$(mktemp -d)'" >> $HOME/.pgdata/postgresql.conf | ||
# TODO: port | ||
pg_ctl -D "$HOME/.pgdata" -w start || (echo pg_ctl failed; exit 1) | ||
until psql postgres -c "SELECT 1" > /dev/null 2>&1 ; do | ||
echo waiting for pg | ||
sleep 0.5 | ||
done | ||
psql postgres -w -c "CREATE DATABASE $LOCAL_PGDATABASE" | ||
psql postgres -w -c "CREATE ROLE $LOCAL_PGUSER WITH LOGIN PASSWORD '$LOCAL_PGPASSWORD'" | ||
psql postgres -w -c "GRANT ALL PRIVILEGES ON DATABASE $LOCAL_PGDATABASE TO $LOCAL_PGUSER" | ||
''; | ||
start_pg = writeScript "start-pg" | ||
'' | ||
#!${stdenv.shell} | ||
pg_pid="" | ||
set -euo pipefail | ||
# TODO: explain what's happening here | ||
LOCAL_PGHOST=$PGHOST | ||
LOCAL_PGPORT=$PGPORT | ||
LOCAL_PGDATABASE=$PGDATABASE | ||
LOCAL_PGUSER=$PGUSER | ||
LOCAL_PGPASSWORD=$PGPASSWORD | ||
unset PGUSER PGPASSWORD | ||
# TODO: port | ||
pg_ctl -D "$HOME/.pgdata" -w start || (echo pg_ctl failed; exit 1) | ||
until psql postgres -c "SELECT 1" > /dev/null 2>&1 ; do | ||
echo waiting for pg | ||
sleep 0.5 | ||
done | ||
''; | ||
init_pg = writeScript "init-pg" | ||
'' | ||
#!${stdenv.shell} | ||
pg_pid="" | ||
set -euo pipefail | ||
# TODO: explain what's happening here | ||
LOCAL_PGHOST=$PGHOST | ||
LOCAL_PGPORT=$PGPORT | ||
LOCAL_PGDATABASE=$PGDATABASE | ||
LOCAL_PGUSER=$PGUSER | ||
LOCAL_PGPASSWORD=$PGPASSWORD | ||
unset PGUSER PGPASSWORD | ||
initdb -D $HOME/.pgdata | ||
echo "unix_socket_directories = '$(mktemp -d)'" >> $HOME/.pgdata/postgresql.conf | ||
# TODO: port | ||
pg_ctl -D "$HOME/.pgdata" -w start || (echo pg_ctl failed; exit 1) | ||
until psql postgres -c "SELECT 1" > /dev/null 2>&1 ; do | ||
echo waiting for pg | ||
sleep 0.5 | ||
done | ||
psql postgres -w -c "CREATE DATABASE $LOCAL_PGDATABASE" | ||
psql postgres -w -c "CREATE ROLE $LOCAL_PGUSER WITH LOGIN PASSWORD '$LOCAL_PGPASSWORD'" | ||
psql postgres -w -c "GRANT ALL PRIVILEGES ON DATABASE $LOCAL_PGDATABASE TO $LOCAL_PGUSER" | ||
''; | ||
|
||
stop_pg = writeScript "stop-pg" | ||
'' | ||
#!${stdenv.shell} | ||
pg_pid="" | ||
set -euo pipefail | ||
pg_ctl -D $HOME/.pgdata -w -m immediate stop | ||
''; | ||
stop_pg = writeScript "stop-pg" | ||
'' | ||
#!${stdenv.shell} | ||
pg_pid="" | ||
set -euo pipefail | ||
pg_ctl -D $HOME/.pgdata -w -m immediate stop | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
{ pkgs }: | ||
{ | ||
haskellBackend = pkgs.callPackage ./haskell { }; | ||
haskellMiso = pkgs.callPackage ./haskell-miso { }; | ||
rust = pkgs.callPackage ./rust { }; | ||
haskellBackend = pkgs.callPackage ./haskell-backend { }; | ||
haskellMiso = pkgs.callPackage ./haskell-frontend { }; | ||
rustOverlay = pkgs.callPackage ./rust-overlay { }; | ||
rustBackend = pkgs.callPackage ./rust-backend { }; | ||
rustFrontend = pkgs.callPackage ./rust-frontend { }; | ||
database = pkgs.callPackage ./database { }; | ||
} |
Oops, something went wrong.