2021-08-31 03:38:09 +00:00
|
|
|
|
2022-05-08 22:36:28 +00:00
|
|
|
CONFIG = ./config.nix
|
2021-08-08 13:57:45 +00:00
|
|
|
|
2022-05-08 22:36:28 +00:00
|
|
|
entrypoint:
|
2021-08-31 03:38:09 +00:00
|
|
|
nix-build -A entrypoint \
|
2022-05-08 22:36:28 +00:00
|
|
|
--arg baseConfig '(import ${CONFIG})'
|
2021-08-31 03:38:09 +00:00
|
|
|
|
2022-05-08 22:36:28 +00:00
|
|
|
install:
|
|
|
|
nix-build -A install --arg baseConfig '(import ${CONFIG})'
|
2021-08-31 03:38:09 +00:00
|
|
|
./result
|
2021-08-08 13:57:45 +00:00
|
|
|
|
2022-05-08 22:36:28 +00:00
|
|
|
test:
|
|
|
|
$$(nix-build --no-out-link -A pkgs.bash)/bin/bash test.sh
|
|
|
|
@if [ $$? == 0 ]; then echo "TESTS PASSED!"; else echo "TESTS FAILED!"; fi
|
2021-08-08 13:57:45 +00:00
|
|
|
|
|
|
|
srv.shell:
|
2022-05-08 22:36:28 +00:00
|
|
|
nix-shell -A srv.shell --arg baseConfig '(import ${CONFIG})' \
|
|
|
|
--command 'cd srv; return'
|
2021-08-08 13:57:45 +00:00
|
|
|
|
2022-05-08 22:36:28 +00:00
|
|
|
# TODO static is on the way out, these aren't well supported
|
2021-08-08 13:57:45 +00:00
|
|
|
static.serve:
|
|
|
|
nix-shell -A static.shell --run 'cd static; static-serve'
|
|
|
|
|
|
|
|
static.depShell:
|
|
|
|
nix-shell -A static.depShell --command 'cd static; return'
|
|
|
|
|
|
|
|
static.lock:
|
|
|
|
nix-shell -A static.depShell --run 'bundler lock; bundix; rm -rf .bundle vendor'
|