Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / bytewax / default.nix
blobea0bfe9e32da9f12a3c7053ddf9610d6c5d71312
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pythonOlder
7 # build-system
8 , cmake
9 , pkg-config
10 , rustPlatform
12 # native dependencies
13 , cyrus_sasl
14 , openssl
15 , protobuf
17 # dependencies
18 , jsonpickle
20 # optional dependencies
21 , confluent-kafka
23 # test
24 , myst-docutils
25 , pytestCheckHook
28 buildPythonPackage rec {
29   pname = "bytewax";
30   version = "0.17.2";
31   format = "pyproject";
33   disabled = pythonOlder "3.7";
35   src = fetchFromGitHub {
36     owner = "bytewax";
37     repo = pname;
38     rev = "refs/tags/v${version}";
39     hash = "sha256-BecZvBJsaTHIhJhWM9GZldSL6Irrc7fiedulTN9e76I=";
40   };
42   env = {
43     OPENSSL_NO_VENDOR = true;
44   };
46   # Remove docs tests, myst-docutils in nixpkgs is not compatible with package requirements.
47   # Package uses old version.
48   patches = [
49     ./remove-docs-test.patch
50   ];
52   cargoDeps = rustPlatform.importCargoLock {
53     lockFile = ./Cargo.lock;
54     outputHashes = {
55       "columnation-0.1.0" = "sha256-RAyZKR+sRmeWGh7QYPZnJgX9AtWqmca85HcABEFUgX8=";
56       "timely-0.12.0" = "sha256-sZuVLBDCXurIe38m4UAjEuFeh73VQ5Jawy+sr3U/HbI=";
57       "libsqlite3-sys-0.26.0" = "sha256-WpJA+Pm5dWKcdUrP0xS5ps/oE/yAXuQvvsdyDfDet1o=";
58     };
59   };
61   nativeBuildInputs = [
62     cmake
63     pkg-config
64     rustPlatform.maturinBuildHook
65     rustPlatform.cargoSetupHook
66   ];
68   dontUseCmakeConfigure = true;
70   buildInputs = [
71     openssl
72     cyrus_sasl
73     protobuf
74   ];
76   propagatedBuildInputs = [
77     jsonpickle
78   ];
80   passthru.optional-dependencies = {
81     kafka = [
82       confluent-kafka
83     ];
84   };
86   preCheck = ''
87     export PY_IGNORE_IMPORTMISMATCH=1
88   '';
90   checkInputs = [
91     myst-docutils
92     pytestCheckHook
93   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
95   disabledTestPaths = [
96     # dependens on an old myst-docutils version
97     "docs"
98   ];
100   pythonImportsCheck = [
101     "bytewax"
102   ];
104   meta = with lib; {
105     description = "Python Stream Processing";
106     homepage = "https://github.com/bytewax/bytewax";
107     changelog = "https://github.com/bytewax/bytewax/releases/tag/v${version}";
108     license = licenses.asl20;
109     maintainers = with maintainers; [ mslingsby kfollesdal ];
110     # mismatched type expected u8, found i8
111     broken = stdenv.isAarch64;
112   };