Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / bytewax / default.nix
blobc27d756070de4d6d7367a7fdc0e98ba50a5caf15
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , cmake
5 , confluent-kafka
6 , cyrus_sasl
7 , fetchFromGitHub
8 , openssl
9 , pkg-config
10 , protobuf
11 , pytestCheckHook
12 , pythonOlder
13 , rustPlatform
14 , setuptools-rust
17 buildPythonPackage rec {
18   pname = "bytewax";
19   version = "0.17.1";
20   format = "pyproject";
22   disabled = pythonOlder "3.7";
24   src = fetchFromGitHub {
25     owner = "bytewax";
26     repo = pname;
27     rev = "refs/tags/v${version}";
28     hash = "sha256-Cv2bTgs3XfYOcHK628/RgGol7S6E4WfHb7gHXXjBhig=";
29   };
31   env = {
32     OPENSSL_NO_VENDOR = true;
33   };
35   # Remove docs tests, myst-docutils in nixpkgs is not compatible with package requirements.
36   # Package uses old version.
37   patches = [ ./remove-docs-test.patch ];
39   cargoDeps = rustPlatform.importCargoLock {
40     lockFile = ./Cargo.lock;
41     outputHashes = {
42       "columnation-0.1.0" = "sha256-RAyZKR+sRmeWGh7QYPZnJgX9AtWqmca85HcABEFUgX8=";
43       "timely-0.12.0" = "sha256-sZuVLBDCXurIe38m4UAjEuFeh73VQ5Jawy+sr3U/HbI=";
44     };
45   };
47   nativeBuildInputs = [
48     cmake
49     pkg-config
50     rustPlatform.maturinBuildHook
51     rustPlatform.cargoSetupHook
52   ];
54   dontUseCmakeConfigure = true;
56   buildInputs = [
57     openssl
58     cyrus_sasl
59     protobuf
60   ];
62   passthru.optional-dependencies = {
63     kafka = [
64       confluent-kafka
65     ];
66   };
68   preCheck = ''
69     export PY_IGNORE_IMPORTMISMATCH=1
70   '';
72   checkInputs = [
73     pytestCheckHook
74   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
76   pythonImportsCheck = [
77     "bytewax"
78   ];
80   meta = with lib; {
81     description = "Python Stream Processing";
82     homepage = "https://github.com/bytewax/bytewax";
83     changelog = "https://github.com/bytewax/bytewax/releases/tag/v${version}";
84     license = licenses.asl20;
85     maintainers = with maintainers; [ mslingsby kfollesdal ];
86     # mismatched type expected u8, found i8
87     broken = stdenv.isAarch64;
88   };