$100 Bounty: Help me get my dev environment working

Not a traditional job, but a small bounty ($100 USD):
I’m working on an open-source side product Typestream.io with a friend and I would like to do some more development. Small issue: He’s on Mac, I’m on NixOS.

Deliverable: Get a flake setup with gradle to:

  • build and run the test suite Instructions
  • build and push the docker images. instructions
  • (optional) build the docker container using buildImage

Repo: GitHub - typestreamio/typestream: Open Source streaming platform. Write and run typed data pipelines with a minimal, familiar syntax.
My attempt: Dynamic Linking and Java - #3 by jevy

2 Likes

I had a similar issue with a Maven project some time ago. The problem is that the protobuf authors are uploading binaries to Maven Central, which, besides being quite ugly, doesn’t work on NixOS. This should work:

Do a direnv allow (or nix develop . --impure) and try the gradle commands

2 Likes

Hello,

I proposed another solution that, I think is simpler. It does not the same thing, and it is based on your previous attempt: Dynamic Linking and Java - #3 by jevy.

Instead of packaging an (elf-)patched version of protoc-gen-grpc-java, I use the buildFHSEnv to emulate an FSH-compliant system.

The command described in the contributing guides are working.

I created a PR here.

1 Like

buildFHSEnv is great, but it’s Linux-only. macOS lacks the necessary containerization primitives (or even plain old bind mounts). For something portable with macOS you’ll have to patch or replace those binaries.

I guess the real solution would be to add GitHub - grpc/grpc-java: The Java gRPC implementation. HTTP/2 based RPC to nixpkgs, as we have for many other languages: NixOS Search

1 Like

Having the plugin in nixpkgs might be nice, though it’d get harder to make sure you have exactly the right version, and you’ll still have do the extra work (like you did in GitHub - jlesquembre/typestream at nixify) to convince gradle to use it. Additional reference: Does not work with NixOS · Issue #426 · google/protobuf-gradle-plugin · GitHub

Hi everyone,
Thanks for @jlesquembre and @adfaure for tackling this problem. I feel a bit awkward because @adfaure DMed me before @jlesquembre and for what I need (local dev work) even @jlesquembre replied here first.

I think the FHS solution is simpler to maintain and what I’m looking for and I’m awarding the bounty to @adfaure. I appreciate you digging in for me though @jlesquembre .

1 Like

@jevy Don’t feel awkward, all good!

Hello, just passing by to say thank you to @jevy for choosing my solution.

Payment received :sunglasses:

Just a note, you for quick & dirty solutions, you can certainly enable nix-ld (with the appropriates libraries), see e.g my tutorial here Different methods to run a non-nixos executable on Nixos - Unix & Linux Stack Exchange for a list I find helpful. This way you can mostly develop like on any OS, but you lose the portability guarantee since you do not create a nix derivation.