summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/dalle-mini/default.nix4
-rw-r--r--pkgs/development/python-modules/datauri/default.nix37
-rw-r--r--pkgs/development/python-modules/fontparts/default.nix4
-rw-r--r--pkgs/development/python-modules/hg-evolve/default.nix4
-rw-r--r--pkgs/development/python-modules/iminuit/default.nix4
-rw-r--r--pkgs/development/python-modules/mitmproxy/default.nix6
-rw-r--r--pkgs/development/python-modules/nessclient/default.nix6
-rw-r--r--pkgs/development/python-modules/protobuf/default.nix7
-rw-r--r--pkgs/development/python-modules/pygtrie/default.nix4
-rw-r--r--pkgs/development/python-modules/pyside2/default.nix10
-rw-r--r--pkgs/development/python-modules/pytest-testmon/default.nix4
-rw-r--r--pkgs/development/python-modules/reqif/default.nix60
-rw-r--r--pkgs/development/python-modules/shiboken2/default.nix5
-rw-r--r--pkgs/development/python-modules/simplisafe-python/default.nix4
-rw-r--r--pkgs/development/python-modules/sqlite-utils/default.nix4
-rw-r--r--pkgs/development/python-modules/streamdeck/default.nix36
-rw-r--r--pkgs/development/python-modules/streamdeck/hardcode-libusb.patch13
-rw-r--r--pkgs/development/python-modules/testcontainers/default.nix39
-rw-r--r--pkgs/development/python-modules/textx/default.nix178
-rw-r--r--pkgs/development/python-modules/textx/tests.nix53
-rw-r--r--pkgs/development/python-modules/xlib/default.nix4
-rw-r--r--pkgs/development/python-modules/xlib/fix-no-protocol-specified.patch13
22 files changed, 475 insertions, 24 deletions
diff --git a/pkgs/development/python-modules/dalle-mini/default.nix b/pkgs/development/python-modules/dalle-mini/default.nix
index e6612a3cd2a..1cafda70872 100644
--- a/pkgs/development/python-modules/dalle-mini/default.nix
+++ b/pkgs/development/python-modules/dalle-mini/default.nix
@@ -15,11 +15,11 @@
 
 buildPythonPackage rec {
   pname = "dalle-mini";
-  version = "0.1.0";
+  version = "0.1.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-Sbos44uWGnJLYMx/xy0wkyAJHlDhVIeOS7rnYt2W53w=";
+    sha256 = "sha256-/wGIuYSWEUgJmeRN5K9/xuoCs+hpFX4/Tu1un1C4ljk=";
   };
 
   format = "setuptools";
diff --git a/pkgs/development/python-modules/datauri/default.nix b/pkgs/development/python-modules/datauri/default.nix
new file mode 100644
index 00000000000..da6ffe3bd26
--- /dev/null
+++ b/pkgs/development/python-modules/datauri/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "datauri";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "fcurella";
+    repo = "python-datauri";
+    rev = "v${version}";
+    sha256 = "sha256-Eevd/xxKgxvvsAfI/L/KShH+PfxffBGyVwKewLgyEu0=";
+  };
+
+  pythonImportsCheck = [
+    "datauri"
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  disabledTestPaths = [
+    # UnicodeDecodeError: 'utf-8' codec can't decode
+    "tests/test_file_ebcdic.txt"
+  ];
+
+  meta = with lib; {
+    description = "Data URI manipulation made easy.";
+    homepage = "https://github.com/fcurella/python-datauri";
+    license = licenses.unlicense;
+    maintainers = with maintainers; [ yuu ];
+  };
+}
diff --git a/pkgs/development/python-modules/fontparts/default.nix b/pkgs/development/python-modules/fontparts/default.nix
index 1dfaa3f3d5e..28972b62b97 100644
--- a/pkgs/development/python-modules/fontparts/default.nix
+++ b/pkgs/development/python-modules/fontparts/default.nix
@@ -6,13 +6,13 @@
 
 buildPythonPackage rec {
   pname = "fontParts";
-  version = "0.10.6";
+  version = "0.10.7";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-mEnQWmzzZ5S8rWzmXuJDjcuoICi6Q+aneX8hGXj11Gg=";
+    sha256 = "sha256-u0hKI2LLWAUGIVRECk6b5y7UKgJHUx2I8R5Q+qkKxcg=";
     extension = "zip";
   };
 
diff --git a/pkgs/development/python-modules/hg-evolve/default.nix b/pkgs/development/python-modules/hg-evolve/default.nix
index f068fab049a..831ed1235e7 100644
--- a/pkgs/development/python-modules/hg-evolve/default.nix
+++ b/pkgs/development/python-modules/hg-evolve/default.nix
@@ -6,11 +6,11 @@
 
 buildPythonPackage rec {
   pname = "hg-evolve";
-  version = "10.5.1";
+  version = "10.5.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-JGk9PdCDXiDkP8Arw2pfpU+sEj/sCHwwHHWVwF3Ofzw=";
+    sha256 = "sha256-45FOAQDJgAfhlTF/XBmIfvmMM1X7LUzsHAb7NMQl9Fs=";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/iminuit/default.nix b/pkgs/development/python-modules/iminuit/default.nix
index d5337c0b194..f0b744bfbca 100644
--- a/pkgs/development/python-modules/iminuit/default.nix
+++ b/pkgs/development/python-modules/iminuit/default.nix
@@ -9,14 +9,14 @@
 
 buildPythonPackage rec {
   pname = "iminuit";
-  version = "2.12.1";
+  version = "2.13.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-+le1b3wpze7QL5U1p7ZYB6zWoZfyCIUQlIIiLxoCPt4=";
+    hash = "sha256-40eFwqLArqb/hmcv6BuAoErJ1Cp57YJJYw8lKaj2oPo=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/mitmproxy/default.nix b/pkgs/development/python-modules/mitmproxy/default.nix
index 055cb8aee99..ea0f5dd1045 100644
--- a/pkgs/development/python-modules/mitmproxy/default.nix
+++ b/pkgs/development/python-modules/mitmproxy/default.nix
@@ -45,14 +45,14 @@
 
 buildPythonPackage rec {
   pname = "mitmproxy";
-  version = "8.0.0";
+  version = "8.1.1";
   disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-Efazsi8BjBrk7lBKSn2APKHxCc7mzxNrC92BL0VsnCM=";
+    sha256 = "sha256-nW/WfiY6uF67qNa95tvNvSv/alP2WmzTk34LEBma/04=";
   };
 
   propagatedBuildInputs = [
@@ -110,6 +110,8 @@ buildPythonPackage rec {
     # https://github.com/mitmproxy/mitmproxy/commit/36ebf11916704b3cdaf4be840eaafa66a115ac03
     # Tests require terminal
     "test_integration"
+    "test_contentview_flowview"
+    "test_flowview"
   ];
   dontUsePytestXdist = true;
 
diff --git a/pkgs/development/python-modules/nessclient/default.nix b/pkgs/development/python-modules/nessclient/default.nix
index d91a80eb9d0..591d74a95a5 100644
--- a/pkgs/development/python-modules/nessclient/default.nix
+++ b/pkgs/development/python-modules/nessclient/default.nix
@@ -11,7 +11,7 @@
 
 buildPythonPackage rec {
   pname = "nessclient";
-  version = "0.9.16b2";
+  version = "0.10.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.8";
@@ -19,8 +19,8 @@ buildPythonPackage rec {
   src = fetchFromGitHub {
     owner = "nickw444";
     repo = pname;
-    rev = version;
-    sha256 = "1g3q9bv1nn1b8n6bklc05k8pac4cndzfxfr7liky0gnnbri15k81";
+    rev = "refs/tags/${version}";
+    sha256 = "sha256-zjUYdSHIMCB4cCAsOOQZ9YgmFTskzlTUs5z/xPFt01Q=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/protobuf/default.nix b/pkgs/development/python-modules/protobuf/default.nix
index 30e9fbf9ea7..ee1d0bbffb5 100644
--- a/pkgs/development/python-modules/protobuf/default.nix
+++ b/pkgs/development/python-modules/protobuf/default.nix
@@ -19,7 +19,12 @@ buildPythonPackage {
   doCheck = doCheck && !isPy27; # setuptools>=41.4 no longer collects correctly on python2
 
   propagatedBuildInputs = [ six ] ++ lib.optionals isPy27 [ google-apputils ];
-  propagatedNativeBuildInputs = [ buildPackages.protobuf ]; # For protoc.
+  propagatedNativeBuildInputs = let
+    protobufVersion = "${lib.versions.major protobuf.version}_${lib.versions.minor protobuf.version}";
+  in [
+    buildPackages."protobuf${protobufVersion}" # For protoc of the same version.
+  ];
+
   nativeBuildInputs = [ pyext ] ++ lib.optionals isPy27 [ google-apputils ];
   buildInputs = [ protobuf ];
 
diff --git a/pkgs/development/python-modules/pygtrie/default.nix b/pkgs/development/python-modules/pygtrie/default.nix
index 8ee176e80c2..c7738a9f3ec 100644
--- a/pkgs/development/python-modules/pygtrie/default.nix
+++ b/pkgs/development/python-modules/pygtrie/default.nix
@@ -1,10 +1,10 @@
 { lib, fetchPypi, buildPythonPackage, ... }:
 buildPythonPackage rec {
   pname = "pygtrie";
-  version = "2.4.2";
+  version = "2.5.0";
   src = fetchPypi {
     inherit pname version;
-    sha256 = "43205559d28863358dbbf25045029f58e2ab357317a59b11f11ade278ac64692";
+    sha256 = "sha256-IDUUrYJutAPasdLi3dA04NFTS75NvgITuwWT9mvrpOI=";
   };
   meta = {
     homepage = "https://github.com/mina86/pygtrie";
diff --git a/pkgs/development/python-modules/pyside2/default.nix b/pkgs/development/python-modules/pyside2/default.nix
index 3be201d3c91..81df3cbe94c 100644
--- a/pkgs/development/python-modules/pyside2/default.nix
+++ b/pkgs/development/python-modules/pyside2/default.nix
@@ -24,14 +24,22 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs = [ cmake ninja qt5.qmake python ];
-  buildInputs = with qt5; [
+  buildInputs = (with qt5; [
     qtbase qtxmlpatterns qtmultimedia qttools qtx11extras qtlocation qtscript
     qtwebsockets qtwebengine qtwebchannel qtcharts qtsensors qtsvg
+  ]) ++ [
+    python.pkgs.setuptools
   ];
   propagatedBuildInputs = [ shiboken2 ];
 
   dontWrapQtApps = true;
 
+  postInstall = ''
+    cd ../../..
+    ${python.interpreter} setup.py egg_info --build-type=pyside2
+    cp -r PySide2.egg-info $out/${python.sitePackages}/
+  '';
+
   meta = with lib; {
     description = "LGPL-licensed Python bindings for Qt";
     license = licenses.lgpl21;
diff --git a/pkgs/development/python-modules/pytest-testmon/default.nix b/pkgs/development/python-modules/pytest-testmon/default.nix
index 667927bfe10..9652e028946 100644
--- a/pkgs/development/python-modules/pytest-testmon/default.nix
+++ b/pkgs/development/python-modules/pytest-testmon/default.nix
@@ -8,12 +8,12 @@
 
 buildPythonPackage rec {
   pname = "pytest-testmon";
-  version = "1.3.3";
+  version = "1.3.4";
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-Csg5wIm9+ZdAQYdZozlx09rMaVz3GazeS5Z/f4jRECw=";
+    sha256 = "sha256-jr+uKjtm5nFYHrZpG63VNK/wO93TQJh1x4SoTxJtlw0=";
   };
 
   propagatedBuildInputs = [ pytest coverage ];
diff --git a/pkgs/development/python-modules/reqif/default.nix b/pkgs/development/python-modules/reqif/default.nix
new file mode 100644
index 00000000000..3f8376f659e
--- /dev/null
+++ b/pkgs/development/python-modules/reqif/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, buildPythonPackage
+, python3
+, pythonOlder
+, fetchFromGitHub
+, poetry-core
+, beautifulsoup4
+, lxml
+, jinja2
+, dataclasses
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "reqif";
+  version = "0.0.8";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "strictdoc-project";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-PtzRJUvv+Oee08+sdakFviKIhwfLngyal1WSWDtMELg=";
+  };
+
+  postPatch = ''
+    substituteInPlace ./tests/unit/conftest.py --replace \
+       "os.path.abspath(os.path.join(__file__, \"../../../../reqif\"))" \
+      "\"${placeholder "out"}/${python3.sitePackages}/reqif\""
+    substituteInPlace pyproject.toml --replace "^" ">="
+    substituteInPlace requirements.txt --replace "==" ">="
+  '';
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    beautifulsoup4
+    lxml
+    jinja2
+  ] ++ lib.optionals (pythonOlder "3.7") [
+    dataclasses
+  ];
+
+  pythonImportsCheck = [
+    "reqif"
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  meta = with lib; {
+    description = "Python library for ReqIF format";
+    homepage = "https://github.com/strictdoc-project/reqif";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ yuu ];
+  };
+}
diff --git a/pkgs/development/python-modules/shiboken2/default.nix b/pkgs/development/python-modules/shiboken2/default.nix
index 11461a9545c..c4210cfeda2 100644
--- a/pkgs/development/python-modules/shiboken2/default.nix
+++ b/pkgs/development/python-modules/shiboken2/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
   CLANG_INSTALL_DIR = llvmPackages.libclang.out;
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = [ llvmPackages.libclang python qt5.qtbase qt5.qtxmlpatterns ];
+  buildInputs = [ llvmPackages.libclang python python.pkgs.setuptools qt5.qtbase qt5.qtxmlpatterns ];
 
   cmakeFlags = [
     "-DBUILD_TESTS=OFF"
@@ -26,6 +26,9 @@ stdenv.mkDerivation {
   dontWrapQtApps = true;
 
   postInstall = ''
+    cd ../../..
+    ${python.interpreter} setup.py egg_info --build-type=shiboken2
+    cp -r shiboken2.egg-info $out/${python.sitePackages}/
     rm $out/bin/shiboken_tool.py
   '';
 
diff --git a/pkgs/development/python-modules/simplisafe-python/default.nix b/pkgs/development/python-modules/simplisafe-python/default.nix
index 07f0c1bf1e8..62edf7b0fc2 100644
--- a/pkgs/development/python-modules/simplisafe-python/default.nix
+++ b/pkgs/development/python-modules/simplisafe-python/default.nix
@@ -20,7 +20,7 @@
 
 buildPythonPackage rec {
   pname = "simplisafe-python";
-  version = "2022.06.1";
+  version = "2022.07.0";
   format = "pyproject";
 
   disabled = pythonOlder "3.8";
@@ -29,7 +29,7 @@ buildPythonPackage rec {
     owner = "bachya";
     repo = pname;
     rev = "refs/tags/${version}";
-    sha256 = "sha256-5zhj1EAFZ2XCeSfcFN+7gHrcPx/YrEZQ8QfcmLUboIg=";
+    sha256 = "sha256-v3N2f5B6BrwTb4ik2bME8OLzwsHZ3qWx+Jx1pv7KX8A=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/python-modules/sqlite-utils/default.nix b/pkgs/development/python-modules/sqlite-utils/default.nix
index e682365f927..fccbc4affab 100644
--- a/pkgs/development/python-modules/sqlite-utils/default.nix
+++ b/pkgs/development/python-modules/sqlite-utils/default.nix
@@ -14,14 +14,14 @@
 
 buildPythonPackage rec {
   pname = "sqlite-utils";
-  version = "3.27";
+  version = "3.28";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-SercPK2Svrq7rEULglvjq1J3FV0x0aHHKs72HmXkTGo=";
+    hash = "sha256-eQsB9L4WwydWubXq4HtrfJBbZhPKU41kaHfFCwWwpTo=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/streamdeck/default.nix b/pkgs/development/python-modules/streamdeck/default.nix
new file mode 100644
index 00000000000..7d7f0071037
--- /dev/null
+++ b/pkgs/development/python-modules/streamdeck/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, buildPythonPackage
+, fetchPypi
+, substituteAll
+, pkgs
+}:
+
+buildPythonPackage rec {
+  pname = "streamdeck";
+  version = "0.9.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0116a376afc18f3abbf79cc1a4409f81472e19197d5641b9e97e697d105cbdc0";
+  };
+
+  patches = [
+    # substitute libusb path
+    (substituteAll {
+      src = ./hardcode-libusb.patch;
+      libusb = "${pkgs.hidapi}/lib/libhidapi-libusb${stdenv.hostPlatform.extensions.sharedLibrary}";
+    })
+  ];
+
+  pythonImportsCheck = [ "StreamDeck" ];
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Python library to control the Elgato Stream Deck";
+    homepage = "https://github.com/abcminiuser/python-elgato-streamdeck";
+    license = licenses.mit;
+    maintainers = with maintainers; [ majiir ];
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/pkgs/development/python-modules/streamdeck/hardcode-libusb.patch b/pkgs/development/python-modules/streamdeck/hardcode-libusb.patch
new file mode 100644
index 00000000000..acef15b5405
--- /dev/null
+++ b/pkgs/development/python-modules/streamdeck/hardcode-libusb.patch
@@ -0,0 +1,13 @@
+diff --git a/src/StreamDeck/Transport/LibUSBHIDAPI.py b/src/StreamDeck/Transport/LibUSBHIDAPI.py
+index 824c59c..f13754e 100644
+--- a/src/StreamDeck/Transport/LibUSBHIDAPI.py
++++ b/src/StreamDeck/Transport/LibUSBHIDAPI.py
+@@ -110,7 +110,7 @@ class LibUSBHIDAPI(Transport):
+ 

+             search_library_names = {

+                 "Windows": ["hidapi.dll", "libhidapi-0.dll"],

+-                "Linux": ["libhidapi-libusb.so", "libhidapi-libusb.so.0"],

++                "Linux": ["@libusb@"],

+                 "Darwin": ["libhidapi.dylib"],

+             }

+ 

diff --git a/pkgs/development/python-modules/testcontainers/default.nix b/pkgs/development/python-modules/testcontainers/default.nix
new file mode 100644
index 00000000000..a690be88334
--- /dev/null
+++ b/pkgs/development/python-modules/testcontainers/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, fetchFromGitHub
+, buildPythonPackage
+, deprecation
+, docker
+, wrapt
+}:
+
+buildPythonPackage rec {
+  pname = "testcontainers";
+  version = "3.5.0";
+
+  src = fetchFromGitHub {
+    owner = "testcontainers";
+    repo = "testcontainers-python";
+    rev = "v${version}";
+    sha256 = "sha256-uB3MbRVQzbUdZRxkGl635O+K17bkHIGY2JbU8R23Kt0=";
+  };
+
+  buildInputs = [
+    deprecation
+    docker
+    wrapt
+  ];
+
+  # Tests require various container and database services running
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "testcontainers"
+  ];
+
+  meta = with lib; {
+    description = "Allows using docker containers for functional and integration testing";
+    homepage = "https://github.com/testcontainers/testcontainers-python";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ onny ];
+  };
+}
diff --git a/pkgs/development/python-modules/textx/default.nix b/pkgs/development/python-modules/textx/default.nix
new file mode 100644
index 00000000000..9243d3a3edb
--- /dev/null
+++ b/pkgs/development/python-modules/textx/default.nix
@@ -0,0 +1,178 @@
+{ lib
+, buildPythonPackage
+, python3
+, fetchFromGitHub
+, mkdocs
+, twine
+, arpeggio
+, click
+, future
+, setuptools
+, callPackage
+, gprof2dot
+, html5lib
+, jinja2
+, memory_profiler
+, psutil
+, pytestCheckHook
+}:
+
+let
+  textx = buildPythonPackage rec {
+    pname = "textx";
+    version = "3.0.0";
+    format = "setuptools";
+
+    src = fetchFromGitHub {
+      owner = pname;
+      repo = pname;
+      rev = version;
+      sha256 = "sha256-uZlO82dKtWQQR5+Q7dWk3+ZoUzAjDJ8qzC4UMLCtnBk=";
+    };
+
+    postPatch = ''
+      substituteInPlace setup.cfg --replace "click >=7.0, <8.0" "click >=7.0"
+    '';
+
+    outputs = [
+      "out"
+      "testout"
+    ];
+
+    nativeBuildInputs = [
+      mkdocs
+      twine
+    ];
+
+    propagatedBuildInputs = [
+      arpeggio
+      click
+      future
+      setuptools
+    ];
+
+    postInstall = ''
+      # FileNotFoundError: [Errno 2] No such file or directory: '$out/lib/python3.10/site-packages/textx/textx.tx
+      cp "$src/textx/textx.tx" "$out/${python3.sitePackages}/${pname}/"
+
+      # Install tests as the tests output.
+      mkdir $testout
+      cp -r tests $testout/tests
+    '';
+
+    pythonImportsCheck = [
+      "textx"
+    ];
+
+    # Circular dependencies, do tests in passthru.tests instead.
+    doCheck = false;
+
+    passthru.tests = {
+      textxTests = callPackage ./tests.nix {
+        inherit
+          textx-data-dsl
+          textx-example-project
+          textx-flow-codegen
+          textx-flow-dsl
+          textx-types-dsl;
+       };
+    };
+
+    meta = with lib; {
+      description = "Domain-specific languages and parsers in Python";
+      homepage = "https://github.com/textx/textx/";
+      license = licenses.mit;
+      maintainers = with maintainers; [ yuu ];
+    };
+  };
+
+  textx-data-dsl = buildPythonPackage rec {
+    pname = "textx-data-dsl";
+    version = "1.0.0";
+    inherit (textx) src;
+    # `format` isn't included in the output of `mk-python-derivation`.
+    # So can't inherit format: `error: attribute 'format' missing`.
+    format = "setuptools";
+    pathToSourceRoot = "tests/functional/registration/projects/data_dsl";
+    sourceRoot = "${src.name}/" + pathToSourceRoot;
+    propagatedBuildInputs = [
+      textx
+      textx-types-dsl
+    ];
+    meta = with lib; {
+      inherit (textx.meta) license maintainers;
+      description = "Sample textX language for testing";
+      homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
+    };
+  };
+
+  textx-flow-codegen = buildPythonPackage rec {
+    pname = "textx-flow-codegen";
+    version = "1.0.0";
+    inherit (textx) src;
+    format = "setuptools";
+    pathToSourceRoot = "tests/functional/registration/projects/flow_codegen";
+    sourceRoot = "${src.name}/" + pathToSourceRoot;
+    propagatedBuildInputs = [
+      click
+      textx
+    ];
+    meta = with lib; {
+      inherit (textx.meta) license maintainers;
+      description = "Sample textX language for testing";
+      homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
+    };
+  };
+
+  textx-flow-dsl = buildPythonPackage rec {
+    pname = "textx-flow-dsl";
+    version = "1.0.0";
+    inherit (textx) src;
+    format = "setuptools";
+    pathToSourceRoot = "tests/functional/registration/projects/flow_dsl";
+    sourceRoot = "${src.name}/" + pathToSourceRoot;
+    propagatedBuildInputs = [
+      textx
+    ];
+    meta = with lib; {
+      inherit (textx.meta) license maintainers;
+      description = "Sample textX language for testing";
+      homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
+    };
+  };
+
+  textx-types-dsl = buildPythonPackage rec {
+    pname = "textx-types-dsl";
+    version = "1.0.0";
+    inherit (textx) src;
+    format = "setuptools";
+    pathToSourceRoot = "tests/functional/registration/projects/types_dsl";
+    sourceRoot = "${src.name}/" + pathToSourceRoot;
+    propagatedBuildInputs = [
+      textx
+    ];
+    meta = with lib; {
+      inherit (textx.meta) license maintainers;
+      description = "Sample textX language for testing";
+      homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
+    };
+  };
+
+  textx-example-project = buildPythonPackage rec {
+    pname = "textx-example-project";
+    version = "1.0.0";
+    inherit (textx) src;
+    format = "setuptools";
+    pathToSourceRoot = "tests/functional/subcommands/example_project";
+    sourceRoot = "${src.name}/" + pathToSourceRoot;
+    propagatedBuildInputs = [
+      textx
+    ];
+    meta = with lib; {
+      inherit (textx.meta) license maintainers;
+      description = "Sample textX sub-command for testing";
+      homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
+    };
+  };
+in
+  textx
diff --git a/pkgs/development/python-modules/textx/tests.nix b/pkgs/development/python-modules/textx/tests.nix
new file mode 100644
index 00000000000..021224e9f35
--- /dev/null
+++ b/pkgs/development/python-modules/textx/tests.nix
@@ -0,0 +1,53 @@
+{ lib
+, buildPythonPackage
+, click
+, gprof2dot
+, html5lib
+, jinja2
+, memory_profiler
+, psutil
+, pytestCheckHook
+, setuptools
+, textx
+, textx-data-dsl
+, textx-example-project
+, textx-flow-codegen
+, textx-flow-dsl
+, textx-types-dsl
+}:
+
+buildPythonPackage {
+  pname = "textx-tests";
+  inherit (textx) version;
+
+  srcs = textx.testout;
+
+  dontBuild = true;
+  dontInstall = true;
+
+  checkInputs = [
+    click
+    gprof2dot
+    html5lib
+    jinja2
+    memory_profiler
+    psutil
+    pytestCheckHook
+    setuptools
+    textx-data-dsl
+    textx-example-project
+    textx-flow-codegen
+    textx-flow-dsl
+    textx-types-dsl
+  ];
+
+  pytestFlagsArray = [
+    "tests/functional"
+  ];
+
+  meta = with lib; {
+    inherit (textx.meta) license maintainers;
+    description = "passthru.tests for textx";
+    homepage = textx.homepage + "tree/${version}/" + "tests/";
+  };
+}
diff --git a/pkgs/development/python-modules/xlib/default.nix b/pkgs/development/python-modules/xlib/default.nix
index edb4761af3a..05d5e095a16 100644
--- a/pkgs/development/python-modules/xlib/default.nix
+++ b/pkgs/development/python-modules/xlib/default.nix
@@ -22,6 +22,10 @@ buildPythonPackage rec {
     sha256 = "155p9xhsk01z9vdml74h07svlqy6gljnx9c6qbydcr14lwghwn06";
   };
 
+  patches = [
+    ./fix-no-protocol-specified.patch
+  ];
+
   nativeBuildInputs = [ setuptools-scm ];
   buildInputs = [ xorg.libX11 ];
   propagatedBuildInputs = [ six ];
diff --git a/pkgs/development/python-modules/xlib/fix-no-protocol-specified.patch b/pkgs/development/python-modules/xlib/fix-no-protocol-specified.patch
new file mode 100644
index 00000000000..1f3ab927f84
--- /dev/null
+++ b/pkgs/development/python-modules/xlib/fix-no-protocol-specified.patch
@@ -0,0 +1,13 @@
+diff --git a/Xlib/xauth.py b/Xlib/xauth.py
+index 2ed7dd5..303bd49 100644
+--- a/Xlib/xauth.py
++++ b/Xlib/xauth.py
+@@ -120,6 +120,8 @@ class Xauthority(object):
+         matches = {}
+ 
+         for efam, eaddr, enum, ename, edata in self.entries:
++            if enum == b'' and ename not in matches:
++                enum = num
+             if efam == family and eaddr == address and num == enum:
+                 matches[ename] = edata
+