about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--pkgs/development/python-modules/iterable-io/default.nix37
-rw-r--r--pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix39
-rw-r--r--pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix25
-rw-r--r--pkgs/development/python-modules/magic-wormhole/default.nix12
-rw-r--r--pkgs/top-level/python-packages.nix2
6 files changed, 89 insertions, 32 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index ad05a32db4696..0084bb0c6506a 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -13404,6 +13404,12 @@
     matrix = "@mjm:beeper.com";
     name = "Matt Moriarity";
   };
+  mjoerg = {
+    name = "Martin Joerg";
+    email = "martin.joerg@gmail.com";
+    github = "mjoerg";
+    githubId = 147256;
+  };
   mjp = {
     email = "mike@mythik.co.uk";
     github = "MikePlayle";
diff --git a/pkgs/development/python-modules/iterable-io/default.nix b/pkgs/development/python-modules/iterable-io/default.nix
new file mode 100644
index 0000000000000..81799c7aec4fa
--- /dev/null
+++ b/pkgs/development/python-modules/iterable-io/default.nix
@@ -0,0 +1,37 @@
+{
+  lib,
+  buildPythonPackage,
+  pythonOlder,
+  fetchFromGitHub,
+  setuptools,
+  pytestCheckHook,
+}:
+
+buildPythonPackage rec {
+  pname = "iterable-io";
+  version = "1.0.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "pR0Ps";
+    repo = "iterable-io";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-+PSINKS7/FeGHYvkOASA5m+1pBpKfURfylZ8CwKijgA=";
+  };
+
+  nativeBuildInputs = [ setuptools ];
+
+  pythonImportsCheck = [ "iterableio" ];
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
+  meta = {
+    description = "Library to adapt iterables to a file-like interface";
+    homepage = "https://github.com/pR0Ps/iterable-io";
+    changelog = "https://github.com/pR0Ps/iterable-io/blob/v${version}/CHANGELOG.md";
+    license = lib.licenses.lgpl3Only;
+    maintainers = [ lib.maintainers.mjoerg ];
+  };
+}
diff --git a/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix b/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix
index fc9636c351a05..d74be9e45f93e 100644
--- a/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix
+++ b/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix
@@ -3,27 +3,29 @@
 , buildPythonPackage
 , fetchPypi
 , fetchpatch
+, setuptools
 , six
 , attrs
 , twisted
-, pyopenssl
-, service-identity
 , autobahn
 , treq
 , mock
 , pythonOlder
+, pythonAtLeast
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "magic-wormhole-mailbox-server";
   version = "0.4.1";
-  format = "setuptools";
+  pyproject = true;
 
-  disabled = pythonOlder "3.7";
+  # python 3.12 support: https://github.com/magic-wormhole/magic-wormhole-mailbox-server/issues/41
+  disabled = pythonOlder "3.7" || pythonAtLeast "3.12";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1af10592909caaf519c00e706eac842c5e77f8d4356215fe9c61c7b2258a88fb";
+    hash = "sha256-GvEFkpCcqvUZwA5wbqyELF53+NQ1YhX+nGHHsiWKiPs=";
   };
 
   patches = [
@@ -35,6 +37,8 @@ buildPythonPackage rec {
     })
   ];
 
+  nativeBuildInputs = [ setuptools ];
+
   propagatedBuildInputs = [
     attrs
     six
@@ -43,27 +47,24 @@ buildPythonPackage rec {
   ] ++ autobahn.optional-dependencies.twisted
   ++ twisted.optional-dependencies.tls;
 
+  pythonImportsCheck = [ "wormhole_mailbox_server" ];
+
   nativeCheckInputs = [
+    pytestCheckHook
     treq
     mock
-    twisted
   ];
 
-  # Fails in Darwin's sandbox
-  postPatch = lib.optionalString stdenv.isDarwin ''
-    echo 'LogRequests.skip = "Operation not permitted"' >> src/wormhole_mailbox_server/test/test_web.py
-    echo 'WebSocketAPI.skip = "Operation not permitted"' >> src/wormhole_mailbox_server/test/test_web.py
-  '';
-
-  checkPhase = ''
-    trial -j$NIX_BUILD_CORES wormhole_mailbox_server
-  '';
+  disabledTestPaths = lib.optionals stdenv.isDarwin [
+    # these tests fail in Darwin's sandbox
+    "src/wormhole_mailbox_server/test/test_web.py"
+  ];
 
-  meta = with lib; {
+  meta = {
     description = "Securely transfer data between computers";
-    homepage = "https://github.com/warner/magic-wormhole-mailbox-server";
+    homepage = "https://github.com/magic-wormhole/magic-wormhole-mailbox-server";
     changelog = "https://github.com/magic-wormhole/magic-wormhole-mailbox-server/blob/${version}/NEWS.md";
-    license = licenses.mit;
-    maintainers = with maintainers; [ ];
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.mjoerg ];
   };
 }
diff --git a/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix b/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix
index 463b3560457d2..d98080545d357 100644
--- a/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix
+++ b/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix
@@ -1,33 +1,40 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, setuptools
 , autobahn
 , mock
 , twisted
+, pythonOlder
+, pythonAtLeast
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "magic-wormhole-transit-relay";
   version = "0.2.1";
-  format = "setuptools";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7" || pythonAtLeast "3.12";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0ppsx2s1ysikns1h053x67z2zmficbn3y3kf52bzzslhd2s02j6b";
+    hash = "sha256-y0gBtGiQ6v+XKG4OP+xi0dUv/jF9FACDtjNqH7To+l4=";
   };
 
+  nativeBuildInputs = [ setuptools ];
+
   propagatedBuildInputs = [ autobahn twisted ];
 
-  nativeCheckInputs = [ mock twisted ];
+  pythonImportsCheck = [ "wormhole_transit_relay" ];
 
-  checkPhase = ''
-    trial -j$NIX_BUILD_CORES wormhole_transit_relay
-  '';
+  nativeCheckInputs = [ pytestCheckHook mock twisted ];
 
-  meta = with lib; {
+  meta = {
     description = "Transit Relay server for Magic-Wormhole";
     homepage = "https://github.com/magic-wormhole/magic-wormhole-transit-relay";
-    license = licenses.mit;
-    maintainers = with maintainers; [ ];
+    changelog = "https://github.com/magic-wormhole/magic-wormhole-transit-relay/blob/${version}/NEWS.md";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.mjoerg ];
   };
 }
diff --git a/pkgs/development/python-modules/magic-wormhole/default.nix b/pkgs/development/python-modules/magic-wormhole/default.nix
index 7b89f29b76e21..d1bf85f0530aa 100644
--- a/pkgs/development/python-modules/magic-wormhole/default.nix
+++ b/pkgs/development/python-modules/magic-wormhole/default.nix
@@ -17,7 +17,9 @@
 , tqdm
 , click
 , humanize
+, iterable-io
 , txtorcon
+, zipstream-ng
 
 # optional-dependencies
 , noiseprotocol
@@ -34,7 +36,7 @@
 buildPythonPackage rec {
   pname = "magic-wormhole";
   version = "0.14.0";
-  format = "pyproject";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
@@ -56,7 +58,9 @@ buildPythonPackage rec {
     tqdm
     click
     humanize
+    iterable-io
     txtorcon
+    zipstream-ng
   ]
   ++ autobahn.optional-dependencies.twisted
   ++ twisted.optional-dependencies.tls;
@@ -111,12 +115,12 @@ buildPythonPackage rec {
     install -Dm644 docs/wormhole.1 $out/share/man/man1/wormhole.1
   '';
 
-  meta = with lib; {
+  meta = {
     changelog = "https://github.com/magic-wormhole/magic-wormhole/blob/${version}/NEWS.md";
     description = "Securely transfer data between computers";
     homepage = "https://github.com/magic-wormhole/magic-wormhole";
-    license = licenses.mit;
-    maintainers = with maintainers; [ asymmetric ];
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.mjoerg ];
     mainProgram = "wormhole";
   };
 }
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 652113ae8bd12..28fc5dbf9c84e 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5943,6 +5943,8 @@ self: super: with self; {
 
   itemloaders = callPackage ../development/python-modules/itemloaders { };
 
+  iterable-io = callPackage ../development/python-modules/iterable-io { };
+
   iteration-utilities = callPackage ../development/python-modules/iteration-utilities { };
 
   iterative-telemetry = callPackage ../development/python-modules/iterative-telemetry { };