Martin Joerg
2025-08-23 12:01:07 +00:00
parent 2a06a134db
commit a7a7d5d6ec
@@ -3,6 +3,7 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
installShellFiles,
# build-system
@@ -41,16 +42,25 @@
buildPythonPackage rec {
pname = "magic-wormhole";
version = "0.19.2";
version = "0.20.0";
pyproject = true;
src = fetchFromGitHub {
owner = "magic-wormhole";
repo = "magic-wormhole";
tag = version;
hash = "sha256-5Tipcood5RktXY05p20hQpWhSMMnZm67I4iybjV8TcA=";
hash = "sha256-YjzdznZZ/0YTU83f3jlOr6+yOWQ++R1wU9IZDrfAMpo=";
};
patches = [
# TODO: drop when updating beyond version 0.20.0
(fetchpatch {
name = "SubchannelDemultiplex._pending_opens-fix-type.patch";
url = "https://github.com/magic-wormhole/magic-wormhole/commit/6d7f48786b5506df5b6a254bc4e37f6bf5d75593.patch";
hash = "sha256-28YH3enyQ9rTT56OU7FfFonb9l8beJ9QRgPoItzrgu4=";
})
];
postPatch =
# enable tests by fixing the location of the wormhole binary
''
@@ -104,16 +114,17 @@ buildPythonPackage rec {
++ optional-dependencies.dilation
++ lib.optionals stdenv.hostPlatform.isDarwin [ unixtools.locale ];
enabledTestPaths = [ "src/wormhole/test" ];
__darwinAllowLocalNetworking = true;
postInstall = ''
install -Dm644 docs/wormhole.1 $out/share/man/man1/wormhole.1
# https://github.com/magic-wormhole/magic-wormhole/issues/619
installShellCompletion --cmd ${meta.mainProgram} \
--bash wormhole_complete.bash \
--fish wormhole_complete.fish \
--zsh wormhole_complete.zsh
rm $out/wormhole_complete.*
'';
passthru.updateScript = gitUpdater { };