22 # optional-dependencies
29 , magic-wormhole-transit-relay
30 , magic-wormhole-mailbox-server
34 buildPythonPackage rec {
35 pname = "magic-wormhole";
40 inherit pname version;
41 hash = "sha256-rDvWgoYnDn8UnAYUmo5Anl+jTX/rDoiESibSnu0tFRY=";
48 propagatedBuildInputs = [
61 ++ autobahn.optional-dependencies.twisted
62 ++ twisted.optional-dependencies.tls;
64 passthru.optional-dependencies = {
72 magic-wormhole-transit-relay
73 magic-wormhole-mailbox-server
76 ++ passthru.optional-dependencies.dilation
77 ++ lib.optionals stdenv.isDarwin [ unixtools.locale ];
79 disabledTests = lib.optionals stdenv.isDarwin [
80 # These tests doesn't work within Darwin's sandbox
85 "test_sender_allocation"
86 "test_text_wrong_password"
89 "test_allocate_port_no_reuseaddr"
90 "test_ignore_localhost_hint"
91 "test_ignore_localhost_hint_orig"
92 "test_keep_only_localhost_hint"
93 "test_get_direct_hints"
100 disabledTestPaths = lib.optionals stdenv.isDarwin [
101 # These tests doesn't work within Darwin's sandbox
102 "src/wormhole/test/test_xfer_util.py"
103 "src/wormhole/test/test_wormhole.py"
106 postPatch = lib.optionalString stdenv.isLinux ''
107 sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py
111 install -Dm644 docs/wormhole.1 $out/share/man/man1/wormhole.1
115 changelog = "https://github.com/magic-wormhole/magic-wormhole/blob/${version}/NEWS.md";
116 description = "Securely transfer data between computers";
117 homepage = "https://github.com/magic-wormhole/magic-wormhole";
118 license = licenses.mit;
119 maintainers = with maintainers; [ asymmetric ];
120 mainProgram = "wormhole";