$200 Bounty: Help me compile custome code using nix-build

$200 Bounty: Help Compile Custom Code with Nix & SWIG for Valhalla Go Binding

I’m working on creating Go bindings for the Valhalla library ([GitHub - smartfiy/govalhalla]) using SWIG. However, I’m encountering challenges compiling the custom code within my project using Nix-build.

Goal:

I need assistance in successfully compiling the custom code in the govalhalla.git repository and integrating it with SWIG to generate Go bindings.

Requirements:

  • Experience with Nix-build and its capabilities for building Go projects.
  • Familiarity with SWIG and its integration with Go for generating bindings.
  • Ability to troubleshoot potential issues related to dependencies, build environments, and SWIG configuration.

Offer:

I’m offering a $200 bounty for a solution that helps me achieve the following:

  • Compile the custom code in the govalhalla.git repository using Nix-build.
  • Set up SWIG to generate Go bindings for the Valhalla library based on the compiled code.
  • Provide clear instructions and guidance on the process, including any necessary code snippets or configuration files.

Additional Information:

  • I’ve attempted to compile the code using nix-build (briefly describe your attempts if any).

Please respond if you have the expertise to assist me with this task. I’m eager to collaborate and complete the Valhalla Go binding project.

2 Likes

I’m nearly done with this, I just need to compile the test code. What I’ve done so far and how I got there:

  1. Valhalla itself wasn’t building. For this, I added a few missing buildInputs and flags to get it to compile version 3.5.1 properly. See the diff here. Most of my work was actually copied from valhalla-go, funnily enough, another go binding for valhalla.
  2. Once valhalla built successfully, it was just a matter of fixing the default.nix for govalhalla, and the default.nix that defines the nixpkgs version, which was as simple as adding the new dependencies to the files. See the relevant diffs here and here.

Now I’d like to know how to proceed with the test compilation. Do you want a derivation for it, or are you fine with a shell.nix and compiling it manually? I ask because I see a shell.nix in your .gitignore, so I figure that’s what your using.

PS. You could really use a flake.

I can barely work with nix, flakes will be overkill for me in this stage :slight_smile: :sweat_smile:

One more thing not sure if you saw my GitHub msg about dependency and dynamic linking

libspatialite,
luajit,
prime-server,
protobuf,
python3,
sqlite,
Actually those are needed for services and admin which are not needed for this scenario

Flakes reduce the surface of stuff you need to learn rather than increase.

Just learn how they are evaluated and you’ll be all good.

1 Like

I cannot agree with that. Flakes have much more boilerplate code.

1 Like

thanks all, bounty was awarded to @baduhai. thanks for the great work

1 Like