Add benchmark and hoogle devShell options (#175)

This commit is contained in:
Shivaraj B H 2023-06-26 21:51:46 +05:30 committed by GitHub
parent 57cd506878
commit 658dfcf5b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View File

@ -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)

View File

@ -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
@ -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 // {