Contributing with 2nix

I’m attempting to make my first pull request to nixpkgs: groovy-language-server: init at 0-unstable-2025-12-03 by Guilvareux · Pull Request #483523 · NixOS/nixpkgs · GitHub

There’s a gradle project (groovy-language-server) which I can build using gradle2nix. I’m not sure what the best method is to make this available in nixpkgs, as I can’t access a working version of gradle2nix via nixpkgs itself.

I could make a flake in a repository that I control, declare gradle2nix as an input there and pull that into the package.nix of my pull request but I’m not sure if that would be a best practice would be in this case?

I didn’t see a lot of ‘*2nix’ usage in nixpkgs directly so couldn’t copy any approach. Would appreciate any advice. Thanks :slight_smile:

No, adding external flake inputs would not be permitted in nixpkgs.
See https://nixos.org/manual/nixpkgs/unstable/#gradle for how to use gradle in nixpkgs.

2 Likes