# $100 Bounty: Help me get my dev environment working

**URL:** https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949
**Category:** Jobs
**Created:** [April 23, 2024, 9:29am UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949 "2024-04-23T09:29:19Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![jevy](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jevy/32/5650_2.png) [@jevy](https://discourse.nixos.org/u/jevy)
#### Post date: [April 23, 2024, 9:29am UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/1 "2024-04-23T09:29:19Z")

</div>

Not a traditional job, but a small bounty ($100 USD):  
I’m working on an open-source side product [Typestream.io](https://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](https://github.com/typestreamio/typestream/blob/5093884e94868aacf3320cc0e34e4d0962cfcdd1/CONTRIBUTING.md#building-and-running-typestream)
- build and push the docker images. [instructions](https://github.com/typestreamio/typestream/blob/5093884e94868aacf3320cc0e34e4d0962cfcdd1/scripts/dev/push-images.sh)
- (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.](https://github.com/typestreamio/typestream)  
My attempt: [Dynamic Linking and Java - #3 by jevy](https://discourse.nixos.org/t/dynamic-linking-and-java/43320/3)

---

<div class="post-metadata">

### Author: ![jlesquembre](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jlesquembre/32/1700_2.png) [@jlesquembre](https://discourse.nixos.org/u/jlesquembre)
#### Post date: [April 23, 2024, 5:47pm UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/2 "2024-04-23T17:47:09Z")

</div>

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](https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.57.2/), which, besides being quite ugly, doesn’t work on NixOS. This should work:

> **[GitHub - jlesquembre/typestream at nixify](https://github.com/jlesquembre/typestream/tree/nixify)**
>
> nixify

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

---

<div class="post-metadata">

### Author: ![adfaure](https://discourse.nixos.org/user_avatar/discourse.nixos.org/adfaure/32/16400_2.png) [@adfaure](https://discourse.nixos.org/u/adfaure)
#### Post date: [April 24, 2024, 8:39am UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/3 "2024-04-24T08:39:01Z")

</div>

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](https://discourse.nixos.org/t/dynamic-linking-and-java/43320/3).

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](https://github.com/typestreamio/typestream/pull/102) here.

---

<div class="post-metadata">

### Author: ![pxc](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pxc/32/17601_2.png) [@pxc](https://discourse.nixos.org/u/pxc)
#### Post date: [April 24, 2024, 2:30pm UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/4 "2024-04-24T14:30:24Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jlesquembre](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jlesquembre/32/1700_2.png) [@jlesquembre](https://discourse.nixos.org/u/jlesquembre)
#### Post date: [April 24, 2024, 2:33pm UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/5 "2024-04-24T14:33:27Z")

</div>

I guess the real solution would be to add [GitHub - grpc/grpc-java: The Java gRPC implementation. HTTP/2 based RPC](https://github.com/grpc/grpc-java) to nixpkgs, as we have for many other languages: [NixOS Search](https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=protoc-gen-)

---

<div class="post-metadata">

### Author: ![raboof](https://discourse.nixos.org/user_avatar/discourse.nixos.org/raboof/32/1681_2.png) [@raboof](https://discourse.nixos.org/u/raboof)
#### Post date: [April 24, 2024, 2:45pm UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/6 "2024-04-24T14:45:09Z")

</div>

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](https://github.com/jlesquembre/typestream/tree/nixify)) to convince gradle to use it. Additional reference: [Does not work with NixOS · Issue #426 · google/protobuf-gradle-plugin · GitHub](https://github.com/google/protobuf-gradle-plugin/issues/426)

---

<div class="post-metadata">

### Author: ![jevy](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jevy/32/5650_2.png) [@jevy](https://discourse.nixos.org/u/jevy)
#### Post date: [April 26, 2024, 11:12am UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/7 "2024-04-26T11:12:51Z")

</div>

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 .

---

<div class="post-metadata">

### Author: ![jlesquembre](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jlesquembre/32/1700_2.png) [@jlesquembre](https://discourse.nixos.org/u/jlesquembre)
#### Post date: [April 26, 2024, 5:42pm UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/8 "2024-04-26T17:42:48Z")

</div>

@jevy Don’t feel awkward, all good!

---

<div class="post-metadata">

### Author: ![adfaure](https://discourse.nixos.org/user_avatar/discourse.nixos.org/adfaure/32/16400_2.png) [@adfaure](https://discourse.nixos.org/u/adfaure)
#### Post date: [April 27, 2024, 5:06pm UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/9 "2024-04-27T17:06:35Z")

</div>

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

Payment received 🕶

---

<div class="post-metadata">

### Author: ![tobiasBora](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/t/9de0a6/32.png) [@tobiasBora](https://discourse.nixos.org/u/tobiasBora)
#### Post date: [May 1, 2024, 1:00pm UTC](https://discourse.nixos.org/t/100-bounty-help-me-get-my-dev-environment-working/43949/10 "2024-05-01T13:00:32Z")

</div>

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](https://unix.stackexchange.com/questions/522822/different-methods-to-run-a-non-nixos-executable-on-nixos) 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.
