diff --git a/pkgs/development/python-modules/magic-wormhole/default.nix b/pkgs/development/python-modules/magic-wormhole/default.nix index 83152390624b..810a97f6e641 100644 --- a/pkgs/development/python-modules/magic-wormhole/default.nix +++ b/pkgs/development/python-modules/magic-wormhole/default.nix @@ -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 { };