Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of "doBenchmark" parameter #396

Closed
qrilka opened this issue Dec 14, 2018 · 3 comments
Closed

Support of "doBenchmark" parameter #396

qrilka opened this issue Dec 14, 2018 · 3 comments

Comments

@qrilka
Copy link
Contributor

qrilka commented Dec 14, 2018

It doesn't appear as a field in Derivation and also there's no option about it in CLI flags. Is it OK to add in in a PR or maybe there's some reason behind not having it?

@basvandijk
Copy link
Member

basvandijk commented Dec 15, 2018

Note that we already have a doBenchmark function in nixpkgs. Why do we need it as a parameter of Derivation?

@qrilka
Copy link
Contributor Author

qrilka commented Dec 15, 2018

@basvandijk cabal2nix already exposes doCheck and runHaddock (BTW I don't quite understand why is it not doHaddock) and flags --no-haddock and --no-check to set them in the produced derivation. My idea is to have an uniform API and expose doBenchmark in cabal2nix as well.
Alternatively we could get the same result (uniform API) with functions from pkgs.haskell.lib but that will be a breaking change in cabal2nix and also it introduces some overhead of calling those functions.
I think the former would give a bit better API for cabal2nix users.

@peti
Copy link
Member

peti commented Dec 15, 2018

I believe that doBenchmark is absent simply because nobody had asked for it yet. Personally, I wouldn't mind merging a PR that adds support for this particular feature. If it's useful to you, then feel free to go ahead and add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants