nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pyqt5,
6 pytestCheckHook,
7 uv-build,
8}:
9
10buildPythonPackage rec {
11 pname = "qasync";
12 version = "0.28.0";
13
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "CabbageDevelopment";
18 repo = "qasync";
19 tag = "v${version}";
20 hash = "sha256-eQJ1Yszl95IycggSyWcD3opAO1rfBdNp14y8eHDMJY4=";
21 };
22
23 postPatch = ''
24 substituteInPlace pyproject.toml \
25 --replace-fail "uv_build>=0.8.3,<0.9.0" uv_build
26 '';
27
28 build-system = [ uv-build ];
29
30 dependencies = [ pyqt5 ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 pythonImportsCheck = [ "qasync" ];
35
36 # crashes the interpreter
37 disabledTestPaths = [
38 "tests/test_qeventloop.py"
39 "tests/test_run.py"
40 ];
41
42 meta = {
43 description = "Allows coroutines to be used in PyQt/PySide applications by providing an implementation of the PEP 3156 event-loop";
44 homepage = "https://github.com/CabbageDevelopment/qasync";
45 license = [ lib.licenses.bsd2 ];
46 maintainers = [ lib.maintainers.lucasew ];
47 };
48}