Skip to content

Conversation

@poelzi
Copy link
Contributor

@poelzi poelzi commented Dec 7, 2025

Description

The build.rs assumes the source directory is writable, which breaks sandboxed builds like nix. Support BUILD_TOP environment variable, so build systems can simply set it to their build directory.

Checklist:

  • Changelog

Screenshots (optional, if UI related)


This change is Reviewable

Copy link
Collaborator

@pronebird pronebird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it not be NIX_BUILD_TOP according to https://nixos.wiki/wiki/Environment_variables?

@poelzi
Copy link
Contributor Author

poelzi commented Dec 9, 2025

@pronebird yes, for nix specific builds yes. I thought it might be better to make this generic. I can change this, which would simplify the nix pkgs

@pronebird
Copy link
Collaborator

@pronebird yes, for nix specific builds yes. I thought it might be better to make this generic. I can change this, which would simplify the nix pkgs

This can be made generic for sure. I had impression that you've tested this with nix.

However note that build-wireguard-go.sh outputs artifacts in the very same directory, so this patch alone is not sufficient to make it all work.

Further thoughts: @trojanfoe we could probably stop touching file system from here and remove the call to canonicalize which is the reason for build failure when build dir does not exist.

@pronebird
Copy link
Collaborator

Let's merge it as is. Nice first step 👍 Thanks for contribution! 🚀

@pronebird pronebird merged commit 86e1cb6 into nymtech:develop Dec 10, 2025
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants