Skip to content

Commit

Permalink
Add benchmark and hoogle devShell options (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaraj-bh authored Jun 26, 2023
1 parent 57cd506 commit 658dfcf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Add `project.config.defaults.settings.default` defining sensible defaults for local packages.
- Add `project.config.defaults.enable` to turn off all default settings en masse.
- Regressions in this PR: #169, #178
- #175: `devShell`: Add options `benchmark` (to enable benchmark dependencies) and `hoogle` (whether to include Hoogle in development shell)

## 0.3.0 (May 22, 2023)

Expand Down
23 changes: 22 additions & 1 deletion nix/modules/project/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ let
};
'';
};

benchmark = mkOption {
type = types.bool;
description = ''
Whether to include benchmark dependencies in the development shell.
The value of this option will set the corresponding `doBenchmark` flag in the
`shellFor` derivation.
'';
default = false;
};

hoogle = mkOption {
type = types.bool;
default = true;
description = ''
Whether to include Hoogle in the development shell.
The value of this option will set the corresponding `withHoogle` flag in the
`shellFor` derivation.
'';
};
};
};
in
Expand Down Expand Up @@ -99,7 +119,8 @@ in
map
(name: p."${name}")
(lib.attrNames localPackages);
withHoogle = true;
withHoogle = config.devShell.hoogle;
doBenchmark = config.devShell.benchmark;
extraDependencies = p:
let o = mkShellArgs.extraDependencies or (_: { }) p;
in o // {
Expand Down

0 comments on commit 658dfcf

Please sign in to comment.