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

Specify packages available to task #1526

Open
szlend opened this issue Oct 15, 2024 · 2 comments
Open

Specify packages available to task #1526

szlend opened this issue Oct 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@szlend
Copy link
Contributor

szlend commented Oct 15, 2024

I'd like to be able to specify a list of packages available to a task.

So instead of:

tasks = {
  "check:taplo-fmt" = {
    exec = "${pkgs.fd}/bin/fd --hidden --extension=toml --exec-batch ${pkgs.taplo}/bin/taplo format --check";
  };
};

You could write something like this:

tasks = {
  "check:taplo-fmt" = {
    packages = [ pkgs.fd pkgs.taplo ];
    exec = "fd --hidden --extension=toml --exec-batch taplo format --check";
  };
};

The packages option might be confusing together with the existing option tasks.<name>.package which could imo be renamed to something like tasks.<name>.entrypoint or tasks.<name>.interpreter.

@szlend szlend added the enhancement New feature or request label Oct 15, 2024
@domenkozar
Copy link
Member

@szlend would you expect those packages to be an addition to top-level packages option?

@szlend
Copy link
Contributor Author

szlend commented Oct 15, 2024

@szlend would you expect those packages to be an addition to top-level packages option?

I would expect them to be independent to minimize the closure size in CI where tasks would execute. That's how it currently works, right? Or at least make it configurable to disable inheriting from global packages.

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

No branches or pull requests

2 participants