fix git not being in build

This commit is contained in:
xenia 2023-08-16 11:23:01 +02:00
parent 29039f1c20
commit 8d349e0727
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,7 @@
cd "$(git rev-parse --show-toplevel)"
set +e
ROOT="$(git rev-parse --show-toplevel)"
[ $? -ne 0 ] && ROOT=./
cd "$ROOT"
# Check for lock
[ -f matabas-db/dev-lock ]
@ -16,7 +19,7 @@ log() {
# Only trapped if owner
exitHook() {
cd "$(git rev-parse --show-toplevel)"
cd "$ROOT"
log "Stoppar brevekorren"
pg_ctl stop --pgdata=./matabas-db
rm -f matabas-db/dev-lock
@ -50,14 +53,14 @@ setupDb() {
P="$PWD"
clean() {
cd "$(git rev-parse --show-toplevel)"
cd "$ROOT"
log "Rensar byggnad"
rm -rf artifacts
cd - >/dev/null
}
build() {
cd "$(git rev-parse --show-toplevel)"
cd "$ROOT"
( source "buildScripts/build.sh" )
RES=$?
cd - >/dev/null

View File

@ -10,6 +10,7 @@
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
buildInputs = [
pkgs.git
pkgs.postgresql_15_jit
( pkgs.ghc.withPackages (ps: with ps; [
scotty postgresql-typed http-client-tls aeson