diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-08-18 20:27:40 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-08-18 20:27:40 -0600 |
commit | 60018dd9f5b5022d462317231ab49c7007e784dc (patch) | |
tree | dcb841b8d2f8efb5e4dc75d405a88f5908603238 /srv/default.nix | |
parent | d0a604b0baabf8a21032da9a1d64a1c1153a591b (diff) |
load some test data when starting the dev shell
Diffstat (limited to 'srv/default.nix')
-rw-r--r-- | srv/default.nix | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/srv/default.nix b/srv/default.nix index a1ce925..6bae2a8 100644 --- a/srv/default.nix +++ b/srv/default.nix @@ -2,6 +2,7 @@ bash, go, buildGoModule, + sqlite, writeScript, writeText, stdenv, @@ -51,13 +52,12 @@ shell = stdenv.mkDerivation { name = "mediocre-blog-srv-shell"; - buildInputs = [ go ]; - shellHook = ''source ${init}''; - }; + buildInputs = [ go sqlite ]; + shellHook = '' + source ${init} - shellWithBuild = stdenv.mkDerivation { - name = "mediocre-blog-srv-shell-with-build"; - buildInputs = [ go build ]; - shellHook = ''source ${init}''; + echo "Loading test data..." + (cd srv/src/cmd/load-test-data && go run main.go) + ''; }; } |