about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/matrix-nio/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
commita5e1520e4538e29ecfbd4b168306f890566d7bfd (patch)
tree28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/development/python-modules/matrix-nio/default.nix
parent822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff)
parent3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff)
downloadnixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/matrix-nio/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/matrix-nio/default.nix76
1 files changed, 47 insertions, 29 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/matrix-nio/default.nix b/nixpkgs/pkgs/development/python-modules/matrix-nio/default.nix
index db6b13b0fcc3..38daf62a635b 100644
--- a/nixpkgs/pkgs/development/python-modules/matrix-nio/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/matrix-nio/default.nix
@@ -1,54 +1,57 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
-, logbook
+
+# build-system
+, poetry-core
+
+# dependencies
 , aiofiles
 , aiohttp
 , aiohttp-socks
-, aioresponses
-, atomicwrites
-, attrs
-, cachetools
-, faker
-, future
-, git
 , h11
 , h2
-, hypothesis
 , jsonschema
-, peewee
-, poetry-core
-, py
 , pycryptodome
+, unpaddedbase64
+
+# optional-dependencies
+, atomicwrites
+, cachetools
+, peewee
+, python-olm
+
+# tests
+, aioresponses
+, faker
+, hpack
+, hyperframe
+, hypothesis
 , pytest-aiohttp
 , pytest-benchmark
 , pytestCheckHook
-, python-olm
-, unpaddedbase64
+
+# passthru tests
+, nixosTests
+, opsdroid
+, pantalaimon
+, weechatScripts
+, zulip
 }:
 
 buildPythonPackage rec {
   pname = "matrix-nio";
-  version = "0.22.1";
+  version = "0.24.0";
   format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "poljar";
     repo = "matrix-nio";
     rev = version;
-    hash = "sha256-hFSS2Nys95YJgBNED8SBan24iRo2q/UOr6pqUPAF5Ms=";
+    hash = "sha256-XlswVHLvKOi1qr+I7Mbm4IBjn1DG7glgDsNY48NA5Ew=";
   };
 
-  postPatch = ''
-    substituteInPlace pyproject.toml \
-      --replace 'aiofiles = "^0.6.0"' 'aiofiles = "*"' \
-      --replace 'h11 = "^0.12.0"' 'h11 = "*"' \
-      --replace 'cachetools = { version = "^4.2.1", optional = true }' 'cachetools = { version = "*", optional = true }' \
-      --replace 'aiohttp-socks = "^0.7.0"' 'aiohttp-socks = "*"'
-  '';
-
   nativeBuildInputs = [
-    git
     poetry-core
   ];
 
@@ -56,12 +59,9 @@ buildPythonPackage rec {
     aiofiles
     aiohttp
     aiohttp-socks
-    attrs
-    future
     h11
     h2
     jsonschema
-    logbook
     pycryptodome
     unpaddedbase64
   ];
@@ -78,8 +78,9 @@ buildPythonPackage rec {
   nativeCheckInputs = [
     aioresponses
     faker
+    hpack
+    hyperframe
     hypothesis
-    py
     pytest-aiohttp
     pytest-benchmark
     pytestCheckHook
@@ -96,6 +97,23 @@ buildPythonPackage rec {
     "test_transfer_monitor_callbacks"
   ];
 
+  passthru.tests = {
+    inherit (nixosTests)
+      dendrite
+      matrix-appservice-irc
+      matrix-conduit
+      mjolnir
+    ;
+    inherit (weechatScripts)
+      weechat-matrix
+    ;
+    inherit
+      opsdroid
+      pantalaimon
+      zulip
+    ;
+  };
+
   meta = with lib; {
     homepage = "https://github.com/poljar/matrix-nio";
     changelog = "https://github.com/poljar/matrix-nio/blob/${version}/CHANGELOG.md";