Skip to content

Commit

Permalink
split init and seed script
Browse files Browse the repository at this point in the history
  • Loading branch information
Essential Randomness committed Oct 8, 2023
1 parent 45e4a69 commit 59c8573
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,23 @@
'';
};

bobadatabase = pkgs.writeShellApplication {
name = "bobadatabase";
runtimeInputs = [ pkgs.postgresql_12 ];
bobadatabase = {
init = pkgs.writeShellApplication {
name = "bobadatabase-init";
runtimeInputs = [ pkgs.postgresql_12 ];

text = ''
${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/00-init_tables.sh ${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/
'';
text = ''
${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/00-init_tables.sh ${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/
'';
};
seed = pkgs.writeShellApplication {
name = "bobadatabase-seed";
runtimeInputs = [ pkgs.postgresql_12 ];

text = ''
${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/10-init_tables.sh ${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/
'';
};
};

# TODO: swap with wrapProgram
Expand Down

0 comments on commit 59c8573

Please sign in to comment.