From 60018dd9f5b5022d462317231ab49c7007e784dc Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Thu, 18 Aug 2022 20:27:40 -0600 Subject: load some test data when starting the dev shell --- srv/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'srv/default.nix') 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) + ''; }; } -- cgit v1.2.3