pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / python-modules / bytewax / default.nix
blobd7fe5f9a00ec0f3dc7d99bdedf366428a342f903
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
6   pythonOlder,
8   # build-system
9   cmake,
10   pkg-config,
11   rustPlatform,
13   # native dependencies
14   cyrus_sasl,
15   openssl,
16   protobuf,
18   # dependencies
19   jsonpickle,
21   # optional dependencies
22   confluent-kafka,
24   # test
25   myst-docutils,
26   pytestCheckHook,
29 buildPythonPackage rec {
30   pname = "bytewax";
31   version = "0.17.2";
32   format = "pyproject";
34   disabled = pythonOlder "3.7";
36   src = fetchFromGitHub {
37     owner = "bytewax";
38     repo = pname;
39     rev = "refs/tags/v${version}";
40     hash = "sha256-BecZvBJsaTHIhJhWM9GZldSL6Irrc7fiedulTN9e76I=";
41   };
43   env = {
44     OPENSSL_NO_VENDOR = true;
45   };
47   # Remove docs tests, myst-docutils in nixpkgs is not compatible with package requirements.
48   # Package uses old version.
49   patches = [ ./remove-docs-test.patch ];
51   cargoDeps = rustPlatform.importCargoLock {
52     lockFile = ./Cargo.lock;
53     outputHashes = {
54       "columnation-0.1.0" = "sha256-RAyZKR+sRmeWGh7QYPZnJgX9AtWqmca85HcABEFUgX8=";
55       "timely-0.12.0" = "sha256-sZuVLBDCXurIe38m4UAjEuFeh73VQ5Jawy+sr3U/HbI=";
56       "libsqlite3-sys-0.26.0" = "sha256-WpJA+Pm5dWKcdUrP0xS5ps/oE/yAXuQvvsdyDfDet1o=";
57     };
58   };
60   nativeBuildInputs = [
61     cmake
62     pkg-config
63     rustPlatform.maturinBuildHook
64     rustPlatform.cargoSetupHook
65   ];
67   dontUseCmakeConfigure = true;
69   buildInputs = [
70     openssl
71     cyrus_sasl
72     protobuf
73   ];
75   propagatedBuildInputs = [ jsonpickle ];
77   optional-dependencies = {
78     kafka = [ confluent-kafka ];
79   };
81   preCheck = ''
82     export PY_IGNORE_IMPORTMISMATCH=1
83   '';
85   checkInputs = [
86     myst-docutils
87     pytestCheckHook
88   ] ++ lib.flatten (builtins.attrValues optional-dependencies);
90   disabledTestPaths = [
91     # dependens on an old myst-docutils version
92     "docs"
93   ];
95   pythonImportsCheck = [ "bytewax" ];
97   meta = with lib; {
98     description = "Python Stream Processing";
99     homepage = "https://github.com/bytewax/bytewax";
100     changelog = "https://github.com/bytewax/bytewax/releases/tag/v${version}";
101     license = licenses.asl20;
102     maintainers = with maintainers; [
103       mslingsby
104       kfollesdal
105     ];
106     # mismatched type expected u8, found i8
107     broken = stdenv.hostPlatform.isAarch64;
108   };