nix: PGRST_DB_ANON_ROLE default for postgrest-run

Makes manually testing a feature easier
This commit is contained in:
steve-chavez
2023-04-27 19:27:09 -05:00
committed by Steve Chavez
parent 67936b343f
commit 4fe696dd96
+7 -1
View File
@@ -38,11 +38,17 @@ let
{
name = "postgrest-run";
docs = "Run PostgREST after building it interactively with cabal-install";
args = [ "ARG_LEFTOVERS([PostgREST arguments])" ];
args =
[
"ARG_USE_ENV([PGRST_DB_ANON_ROLE], [postgrest_test_anonymous], [PostgREST anonymous role])"
"ARG_LEFTOVERS([PostgREST arguments])"
];
inRootDir = true;
withEnv = postgrest.env;
}
''
export PGRST_DB_ANON_ROLE
exec ${cabal-install}/bin/cabal v2-run ${devCabalOptions} --verbose=0 -- \
postgrest "''${_arg_leftovers[@]}"
'';