nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest-asyncio,
7 pytestCheckHook,
8 typing-extensions,
9}:
10
11buildPythonPackage rec {
12 pname = "reactivex";
13 version = "4.1.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "ReactiveX";
18 repo = "RxPY";
19 tag = "v${version}";
20 hash = "sha256-napPfp72gqy43UmkPu1/erhjmJbZypHZQikmjIFVBqA=";
21 };
22
23 build-system = [ poetry-core ];
24
25 dependencies = [ typing-extensions ];
26
27 nativeCheckInputs = [
28 pytest-asyncio
29 pytestCheckHook
30 ];
31
32 postPatch = ''
33 # Upstream doesn't set a version for their GitHub releases
34 substituteInPlace pyproject.toml \
35 --replace 'version = "0.0.0"' 'version = "${version}"'
36 '';
37
38 pythonImportsCheck = [ "reactivex" ];
39
40 meta = {
41 changelog = "https://github.com/ReactiveX/RxPY/releases/tag/${src.tag}";
42 description = "Library for composing asynchronous and event-based programs";
43 homepage = "https://github.com/ReactiveX/RxPY";
44 license = lib.licenses.mit;
45 maintainers = with lib.maintainers; [ fab ];
46 };
47}