mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-15 05:09:05 +00:00
https://github.com/magic-wormhole/magic-wormhole-transit-relay/compare/refs/tags/0.4.0...refs/tags/0.5.0 https://github.com/magic-wormhole/magic-wormhole-transit-relay/blob/refs/tags/0.5.0/NEWS.md
60 lines
1.5 KiB
Nix
60 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
autobahn,
|
|
twisted,
|
|
python,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "magic-wormhole-transit-relay";
|
|
version = "0.5.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "magic-wormhole";
|
|
repo = "magic-wormhole-transit-relay";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-UhV0M8Nl9Y850PQcJoDyIvIPRyBS8gyF2Ub9qF3aq0U=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# Passing the environment to twistd is necessary to preserve Python's site path.
|
|
substituteInPlace src/wormhole_transit_relay/test/test_backpressure.py --replace-fail \
|
|
'reactor.spawnProcess(proto, exe, args)' \
|
|
'reactor.spawnProcess(proto, exe, args, None)'
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
autobahn
|
|
twisted
|
|
];
|
|
|
|
pythonImportsCheck = [ "wormhole_transit_relay" ];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
twisted
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
postCheck = ''
|
|
# Avoid collision with twisted's plugin cache (#164775).
|
|
rm "$out/${python.sitePackages}/twisted/plugins/dropin.cache"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Transit Relay server for Magic-Wormhole";
|
|
homepage = "https://github.com/magic-wormhole/magic-wormhole-transit-relay";
|
|
changelog = "https://github.com/magic-wormhole/magic-wormhole-transit-relay/blob/${finalAttrs.src.rev}/NEWS.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ lib.maintainers.mjoerg ];
|
|
};
|
|
})
|