diff options
Diffstat (limited to 'pkgs/development/python-modules/reactivex/default.nix')
-rw-r--r-- | pkgs/development/python-modules/reactivex/default.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/reactivex/default.nix b/pkgs/development/python-modules/reactivex/default.nix new file mode 100644 index 00000000000..4d95605a09b --- /dev/null +++ b/pkgs/development/python-modules/reactivex/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, typing-extensions +}: + +buildPythonPackage rec { + pname = "reactivex"; + version = "4.0.4"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "ReactiveX"; + repo = "RxPY"; + rev = "refs/tags/v${version}"; + hash = "sha256-W1qYNbYV6Roz1GJtP/vpoPD6KigWaaQOWe1R5DZHlUw="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + typing-extensions + ]; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + # Upstream doesn't set a version for their GitHub releases + substituteInPlace pyproject.toml \ + --replace 'version = "0.0.0"' 'version = "${version}"' + ''; + + pythonImportsCheck = [ + "reactivex" + ]; + + meta = with lib; { + description = "Library for composing asynchronous and event-based programs"; + homepage = "https://github.com/ReactiveX/RxPY"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |