summaryrefslogtreecommitdiff
path: root/srv/default.nix
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-08-18 20:27:40 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-08-18 20:27:40 -0600
commit60018dd9f5b5022d462317231ab49c7007e784dc (patch)
treedcb841b8d2f8efb5e4dc75d405a88f5908603238 /srv/default.nix
parentd0a604b0baabf8a21032da9a1d64a1c1153a591b (diff)
load some test data when starting the dev shell
Diffstat (limited to 'srv/default.nix')
-rw-r--r--srv/default.nix14
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)
+ '';
};
}