-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Is your feature request related to a problem? Please describe.
In trying to use rules_nixpkgs
in a new bzlmod based project, I struggled to find a complete working example of rules_nixpkgs
with bzlmod
.
Describe the solution you'd like
Add a self contained example to the Setup section of README.md which illustrates the canonical use of rules_nixpkgs with bazel modules. My particular use case is C++, so it would be cool to see an example which for example, had a cc_binary
with deps
that referenced a C/C++ library provided via nixpkgs
. I'm also not a nix expert, so something that doesn't immediately blow my stack would be ideal :)
Describe alternatives you've considered
Not using rules_nixpkgs until I can understand if it fully supports bazel modules.
Additional context
I have read most of https://github.com/tweag/rules_nixpkgs/blob/master/design/bzlmod/README.md and found it to be a bit overwhelming. There are also some examples of using bazel modules here:
https://github.com/tweag/rules_nixpkgs/tree/master?tab=readme-ov-file#with-with-bzlmod
https://github.com/tweag/rules_nixpkgs/tree/master?tab=readme-ov-file#bazel-7-with-bzlmod
but these are buried inside the documentation to nixpkgs_java_configure
and include a bunch of other things that are irrelevant to non-Java use cases.