1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, poetry-core 5, pytest-asyncio 6, pytestCheckHook 7, pythonOlder 8, typing-extensions 9}: 10 11buildPythonPackage rec { 12 pname = "reactivex"; 13 version = "4.0.4"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "ReactiveX"; 20 repo = "RxPY"; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-W1qYNbYV6Roz1GJtP/vpoPD6KigWaaQOWe1R5DZHlUw="; 23 }; 24 25 nativeBuildInputs = [ 26 poetry-core 27 ]; 28 29 propagatedBuildInputs = [ 30 typing-extensions 31 ]; 32 33 checkInputs = [ 34 pytest-asyncio 35 pytestCheckHook 36 ]; 37 38 postPatch = '' 39 # Upstream doesn't set a version for their GitHub releases 40 substituteInPlace pyproject.toml \ 41 --replace 'version = "0.0.0"' 'version = "${version}"' 42 ''; 43 44 pythonImportsCheck = [ 45 "reactivex" 46 ]; 47 48 meta = with lib; { 49 description = "Library for composing asynchronous and event-based programs"; 50 homepage = "https://github.com/ReactiveX/RxPY"; 51 license = with licenses; [ mit ]; 52 maintainers = with maintainers; [ fab ]; 53 }; 54}