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

Make backends accept a function that takes the available backends as an argument #23

Open
jiribenes opened this issue Sep 19, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jiribenes
Copy link
Owner

Avoid having to reference platform-specific libraries by changing the backends argument everywhere to

  backends ? (bs: with bs; [ js ])  # Backends is now a function taking available backends

and then on a use site change to something like:

    buildInputs = [pkgs.jre] ++ pkgs.lib.concatMap (b: b.buildInputs) (backends effektBackends);

Don't forget about the assert that the resulting list of backends shouldn't be empty, this probably needs a let binding.
It might be also useful to check that backends is a function and report that to the user, especially given that it's a breaking change :)

Maybe the existing effektBackends needs to take pkgs as a parameter?

@jiribenes jiribenes added enhancement New feature or request help wanted Extra attention is needed labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant