summaryrefslogtreecommitdiffstats
path: root/shell.nix
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-10-29 14:29:05 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-11-03 15:58:51 +0100
commit0700338a63a5f834659974c1d0c87d169861776f (patch)
tree1a83bd487fa8d19aaecd1c44c7567a21fb77476e /shell.nix
parentde4a9a16977976e2880ac9e49c9acd624c14673d (diff)
Add pgcli and helper script to development shell
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix
index 3a50eb0..7b9c8a4 100644
--- a/shell.nix
+++ b/shell.nix
@@ -6,6 +6,16 @@ let
);
pkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
+
+ pgcli-dev = pkgs.writeShellScriptBin "pgcli-dev" ''
+ exec ${pkgs.pgcli}/bin/pgcli -h localhost -p 5432 ${PG_DB} ${PG_USER}
+ '';
+
+ PG_USER = "pgdev";
+ PG_DB = "butido";
+ PG_PW = "password";
+ PG_CONTAINER_NAME = "pg-dev-container";
+
in
pkgs.mkShell {
buildInputs = with pkgs; [
@@ -16,6 +26,7 @@ pkgs.mkShell {
diesel-cli
pgcli
+ pgcli-dev
cmake
curl
@@ -31,6 +42,7 @@ pkgs.mkShell {
'';
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang}/lib";
+ inherit PG_USER PG_DB PG_PW PG_CONTAINER_NAME;
}