Packaging Bisq, some doubts around Tor

After some weeks I get Bisq derivation working well. But i have some doubts:

Bisq depends on Tor running. By the default uses a native binary client packaged for Java projects (GitHub - JesusMcCloud/tor-binary: Tor binary packaged in a way that can be used for java projects), but also allows to connect to an external Tor.

Which path is preferred for a Nix package, patch the binary in build phase (is a bit dirty patch)? or make Tor as an external dependency and wrap Bisq execution?

Thanks in advance!

Bisq depends on Tor running. By the default uses a native binary client packaged for Java projects ( GitHub - JesusMcCloud/tor-binary: Tor binary packaged in a way that can be used for java projects ), but also allows to connect to an external Tor.

If wrapping is easy, I would wrap Nixpkgs Tor: this native binary is there for the ease of installation, but in Nixpkgs it is both cleaner and not harder to run our default Tor client.

(Does Bisq check there is no other Tor client already running on the machine, by the way?)

Is not easy.

I have to specify Bisq the Tor control port and some kind of authentication. Also Bisq doesn’t launch external client, only connect to it.

So in wrapper right now: I launch Nix tor, and kill it when Bisq closes :woozy_face:

Finally I choose to patch the maven native binaries when create the offline maven repo.

This way, the application manages tor lifecycle. So more straightforward solution.