Skip to content

Commit

Permalink
Make flake dev shell more useful for sqlx.
Browse files Browse the repository at this point in the history
  • Loading branch information
zopieux committed Feb 11, 2024
1 parent f627faf commit d4f77d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
devShells.default = pkgs.mkShell {
shellHook = ''
echo 'To create a test DB, use: export DATABASE_URL=$(pg_tmp -w 0 -d /tmp/ircjournal-pg)'
echo 'To migrate to be able to use sqlx compile-time validation, use: sqlx migrate run --source ircjournal/migrations'
'';
SQLX_OFFLINE = 0;
DATABASE_URL = "postgresql:///test?host=%2Ftmp%2Fircjournal-pg";
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
inputsFrom = with packages; [ ircjournal ];
buildInputs = with pkgs; [
Expand Down

0 comments on commit d4f77d9

Please sign in to comment.