remove cfp-db-init, fix cfp-sqitch
parent
14e005f3b7
commit
392eb1bca8
|
@ -27,18 +27,8 @@ pkgs.stdenv.mkDerivation {
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd $out/lib/cfp-db
|
||||
exec sqitch \$@
|
||||
exec ${pkgs.sqitchPg}/bin/sqitch \$@
|
||||
EOF
|
||||
chmod +x $out/bin/cfp-sqitch
|
||||
|
||||
# cfp-db-init
|
||||
cat > $out/bin/cfp-db-init <<EOF
|
||||
#!/usr/bin/env bash
|
||||
${pkgs.postgresql}/bin/createdb -e cfp
|
||||
${pkgs.postgresql}/bin/psql -d cfp -c 'CREATE ROLE postgraphile LOGIN;'
|
||||
${pkgs.postgresql}/bin/psql -d cfp -c 'GRANT ALL PRIVILEGES ON DATABASE cfp TO postgraphile;'
|
||||
echo 'database initialized. Now set the application password for postgraphile.'
|
||||
EOF
|
||||
chmod +x $out/bin/cfp-db-init
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ in
|
|||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
ln -s ${db}/bin/cfp-db-init $out/bin/cfp-db-init
|
||||
ln -s ${db}/bin/cfp-sqitch $out/bin/cfp-sqitch
|
||||
ln -s ${backend}/bin/cfp-backend $out/bin/cfp-backend
|
||||
'';
|
||||
|
|
Loading…
Reference in New Issue