From 0e3349d5486c24809f883efef8571a046d399477 Mon Sep 17 00:00:00 2001 From: lucasew Date: Sat, 8 Jul 2023 14:49:07 -0300 Subject: [PATCH] python3Packages.qasync: init at 0.24.1 Signed-off-by: lucasew --- .../python-modules/qasync/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/qasync/default.nix diff --git a/pkgs/development/python-modules/qasync/default.nix b/pkgs/development/python-modules/qasync/default.nix new file mode 100644 index 000000000000..bdbede92c5d4 --- /dev/null +++ b/pkgs/development/python-modules/qasync/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pyqt5 +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "qasync"; + version = "0.24.1"; + + src = fetchFromGitHub { + owner = "CabbageDevelopment"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-DAzmobw+c29Pt/URGO3bWXHBxgu9bDHhdTUBE9QJDe4="; + }; + + postPatch = '' + rm qasync/_windows.py # Ignoring it is not taking effect and it will not be used on Linux + ''; + + propagatedBuildInputs = [ pyqt5 ]; + + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "qasync" ]; + + disabledTestPaths = [ + "tests/test_qeventloop.py" + ]; + + meta = { + description = "Allows coroutines to be used in PyQt/PySide applications by providing an implementation of the PEP 3156 event-loop"; + homepage = "https://github.com/CabbageDevelopment/qasync"; + license = [ lib.licenses.bsd2 ]; + maintainers = [ lib.maintainers.lucasew ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 563b6f7899aa..8dd5c0dfecba 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10762,6 +10762,8 @@ self: super: with self; { qbittorrent-api = callPackage ../development/python-modules/qbittorrent-api { }; + qasync = callPackage ../development/python-modules/qasync { }; + qcelemental = callPackage ../development/python-modules/qcelemental { }; qcengine = callPackage ../development/python-modules/qcengine { };