Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ratox: 0.2.1 -> 0.4 #32417

Merged
merged 2 commits into from Dec 23, 2017
Merged

ratox: 0.2.1 -> 0.4 #32417

merged 2 commits into from Dec 23, 2017

Conversation

oxij
Copy link
Member

@oxij oxij commented Dec 7, 2017

Motivation for this change

Update.

The problem with both old and new ratox versions is that they have an outdated bootstrap node list and so can't connect to the DHT. If one is to patch the source with an updated node list it works. But I don't want to put a huge patch for that into nixpkgs. Just be aware that it wouldn't strictly "work" as-is if you run the compiled binary. This update is mainly a follow up to #22775 to drop libtoxcore-old derivation.

/cc @peterhoeg

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

libsodium libmsgpack ncurses
buildInputs = [ ncurses ];

propagatedBuildInputs = [
Copy link
Member

Choose a reason for hiding this comment

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

I believe propagatedBuildInputs only apply to python packages.

Copy link
Contributor

Choose a reason for hiding this comment

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

They're used way more in python packaging, while they're normally reserved for ensuring that adding a to inputs also brings in b, as in this case.

Copy link
Contributor

Choose a reason for hiding this comment

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

ratox should not explicitly link with libsodium and libmsgpack because it does not include their headers and is not linked with them statically. I have removed the change to libtoxcore.

@oxij
Copy link
Member Author

oxij commented Dec 8, 2017 via email

@peterhoeg
Copy link
Member

How about fetchpatching the updated nodelist then? While getting rid of libtoxcore-old is great, an actual working ratox is even better! ;-)

Copy link
Contributor

@orivej orivej left a comment

Choose a reason for hiding this comment

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

ratox was able to bootstrap DHT for me.

libsodium libmsgpack ncurses
buildInputs = [ ncurses ];

propagatedBuildInputs = [
Copy link
Contributor

Choose a reason for hiding this comment

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

ratox should not explicitly link with libsodium and libmsgpack because it does not include their headers and is not linked with them statically. I have removed the change to libtoxcore.

@oxij
Copy link
Member Author

oxij commented Dec 22, 2017 via email

@orivej orivej merged commit cc8705d into NixOS:master Dec 23, 2017
@orivej
Copy link
Contributor

orivej commented Dec 23, 2017

Maybe some DHT nodes were offline when I tested it.

The first 2 or 3 it tried were inaccessible, but it kept retrying and was able to connect.

But I don't see how propagating those things as in the original patchset could hurt. I could be used to simplify other expressions using libtoxcore that do link those libraries (e.g. qTox) and then ratox

In general packages should declare all their direct dependencies because it prevents breakage when implicit but necessary dependencies are no longer transitively included. In particular, qtox does #include <sodium.h> and hence depends on libsodium, but it does not directly depend on libmsgpack so it does not declare this dependency. ratox directly depends on neither (except in the attempt to link with them) and does not need to declare them.

@oxij oxij deleted the pkg/ratox branch September 8, 2018 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants