depot/third_party/nixpkgs/pkgs/development/python-modules/magic-wormhole/default.nix
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

71 lines
1.3 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, spake2
, pynacl
, six
, attrs
, twisted
, autobahn
, automat
, hkdf
, tqdm
, click
, humanize
, txtorcon
, nettools
, mock
, magic-wormhole-transit-relay
, magic-wormhole-mailbox-server
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "magic-wormhole";
version = "0.12.0";
src = fetchPypi {
inherit pname version;
sha256 = "0q41j99718y7m95zg1vaybnsp31lp6lhyqkbv4yqz5ys6jixh3qv";
};
propagatedBuildInputs = [
spake2
pynacl
six
attrs
twisted
autobahn
automat
hkdf
tqdm
click
humanize
txtorcon
] ++ autobahn.optional-dependencies.twisted
++ twisted.optional-dependencies.tls;
checkInputs = [
mock
magic-wormhole-transit-relay
magic-wormhole-mailbox-server
pytestCheckHook
];
postPatch = lib.optionalString stdenv.isLinux ''
sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py
'';
postInstall = ''
install -Dm644 docs/wormhole.1 $out/share/man/man1/wormhole.1
'';
meta = with lib; {
description = "Securely transfer data between computers";
homepage = "https://github.com/magic-wormhole/magic-wormhole";
license = licenses.mit;
maintainers = with maintainers; [ asymmetric SuperSandro2000 ];
mainProgram = "wormhole";
};
}