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

Devbox support #588

Open
aaomidi opened this issue Sep 12, 2024 · 2 comments
Open

Devbox support #588

aaomidi opened this issue Sep 12, 2024 · 2 comments

Comments

@aaomidi
Copy link

aaomidi commented Sep 12, 2024

Is your feature request related to a problem? Please describe.
Inability to use my existing devbox.lock file with this rule is a bit frustrating, but its not necessarily this tools job :P.

Describe the solution you'd like
I already use devbox for dependency management for the tools I use. I would like if I can reuse the same devbox.lock file that I use for my local dev environment, inside Bazel.

Describe alternatives you've considered
Just using rules_nixpkgs

Additional context
jetify-com/devbox#2268

@avdv
Copy link
Member

avdv commented Sep 13, 2024

I think that should actually not be too complicated. You could create a repository rule which reads the lock file (it's just JSON) and extracts the resolved value (which looks like github:NixOS/nixpkgs/5775c2583f1801df7b790bf7f7d710a19bac66f4#ripgrep) of each tool you want to import.

Then, split at the # and generate a call to nixpkgs_git_repository for the first part, a nixpkgs_package (or toolchain rule) for the second.

@aherrmann
Copy link
Member

Given that it needs to invoke other repository rules it might even lend itself better to a module extension.
You can take a look at nix_pkg and nix_repo for reference.

@malt3 malt3 added good first issue P3 minor: not priorized labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants