Skip to content

Commit

Permalink
preHook and postHook actually belong in 'cli'
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Oct 21, 2024
1 parent 014bfa1 commit dd67ac4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
## Unreleased

- New features
- #81: Support for specifying process-compose global CLI options
- **Breaking change**: Old options `httpServer` and `tui` were removed; users should use the new `cli` module to set all process-compose cli arguments and options.
- #81, #84: Support for specifying process-compose global CLI options
- **Breaking changes**:
- `preHook` and `postHook` are now inside `cli` module.
- Old options `httpServer` and `tui` were removed; users should use the new `cli` module to set all process-compose cli arguments and options.
- ~~#18: Add `testScript` option for adding flake checks based on nixosTest library.~~
- #39: Allow `test` process to act as a test, which then gets run as part of flake checks.
- #55: Add `lib` flake output - library of useful functions
Expand Down
10 changes: 10 additions & 0 deletions nix/process-compose/cli-options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ in
{
options = {
cli = {
preHook = mkOption {
type = types.lines;
default = "";
description = "Shell commands to run before process-compose starts.";
};
postHook = mkOption {
type = types.lines;
default = "";
description = "Shell commands to run after process-compose completes.";
};
options = mkOption {
description = "CLI options to pass to process-compose binary";
default = { };
Expand Down
20 changes: 0 additions & 20 deletions nix/process-compose/cli.nix

This file was deleted.

5 changes: 2 additions & 3 deletions nix/process-compose/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ let
in
{
imports = [
./cli.nix
./cli-options.nix
./settings
./test.nix
Expand Down Expand Up @@ -60,7 +59,7 @@ in
mkProcessComposeWrapper
{
inherit name;
inherit (config) preHook postHook;
inherit (config.cli) preHook postHook;
cliOutputs = config.cli.outputs;
configFile = config.outputs.settingsFile;
};
Expand All @@ -71,7 +70,7 @@ in
mkProcessComposeWrapper
{
name = "${name}-test";
inherit (config) preHook postHook;
inherit (config.cli) preHook postHook;
cliOutputs = config.cli.outputs;
configFile = config.outputs.settingsTestFile;
}
Expand Down

0 comments on commit dd67ac4

Please sign in to comment.