evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ap / apache-airflow / package.nix
blob48df7ea612b4f70de24b7e04a7e0f446cce2d820
1 { fetchFromGitHub
2 , fetchPypi
3 , python3
4 }:
6 let
7   python = python3.override {
8     self = python;
9     packageOverrides = pySelf: pySuper: {
10       connexion = pySuper.connexion.overridePythonAttrs (o: rec {
11         version = "2.14.2";
12         src = fetchFromGitHub {
13           owner = "spec-first";
14           repo = "connexion";
15           rev = "refs/tags/${version}";
16           hash = "sha256-1v1xCHY3ZnZG/Vu9wN/it7rLKC/StoDefoMNs+hMjIs=";
17         };
18         nativeBuildInputs = with pySelf; [
19           setuptools
20         ];
21         pythonRelaxDeps = [
22           "werkzeug"
23         ];
24         propagatedBuildInputs = with pySelf; [
25           aiohttp
26           aiohttp-jinja2
27           aiohttp-swagger
28           clickclick
29           flask
30           inflection
31           jsonschema
32           openapi-spec-validator
33           packaging
34           pyyaml
35           requests
36           swagger-ui-bundle
37         ];
38         nativeCheckInputs = with pySelf; [
39           aiohttp-remotes
40           decorator
41           pytest-aiohttp
42           pytestCheckHook
43           testfixtures
44         ];
45         disabledTests = [
46           "test_app"
47           "test_openapi_yaml_behind_proxy"
48           "test_swagger_ui"
49         ];
50       });
51       flask = pySuper.flask.overridePythonAttrs (o: rec {
52         version = "2.2.5";
53         src = fetchPypi {
54           pname = "Flask";
55           inherit version;
56           hash = "sha256-7e6bCn/yZiG9WowQ/0hK4oc3okENmbC7mmhQx/uXeqA=";
57         };
58         nativeBuildInputs = (o.nativeBuildInputs or []) ++ [
59           pySelf.setuptools
60         ];
61       });
62       # flask-appbuilder doesn't work with sqlalchemy 2.x, flask-appbuilder 3.x
63       # https://github.com/dpgaspar/Flask-AppBuilder/issues/2038
64       flask-appbuilder = pySuper.flask-appbuilder.overridePythonAttrs (o: {
65         meta.broken = false;
66       });
67       # a knock-on effect from overriding the sqlalchemy version
68       flask-sqlalchemy = pySuper.flask-sqlalchemy.overridePythonAttrs (o: {
69         src = fetchPypi {
70           pname = "Flask-SQLAlchemy";
71           version = "2.5.1";
72           hash = "sha256-K9pEtD58rLFdTgX/PMH4vJeTbMRkYjQkECv8LDXpWRI=";
73         };
74         format = "setuptools";
75       });
76       httpcore = pySuper.httpcore.overridePythonAttrs (o: rec {
77         # nullify upstream's pytest flags which cause
78         # "TLS/SSL connection has been closed (EOF)"
79         # with pytest-httpbin 1.x
80         preCheck = ''
81           substituteInPlace pyproject.toml \
82             --replace '[tool.pytest.ini_options]' '[tool.notpytest.ini_options]'
83         '';
84       });
85       pytest-httpbin = pySuper.pytest-httpbin.overridePythonAttrs (o: rec {
86         version = "1.0.2";
87         src = fetchFromGitHub {
88           owner = "kevin1024";
89           repo = "pytest-httpbin";
90           rev = "refs/tags/v${version}";
91           hash = "sha256-S4ThQx4H3UlKhunJo35esPClZiEn7gX/Qwo4kE1QMTI=";
92         };
93       });
94       # apache-airflow doesn't work with sqlalchemy 2.x
95       # https://github.com/apache/airflow/issues/28723
96       sqlalchemy = pySuper.sqlalchemy_1_4;
98       apache-airflow = pySelf.callPackage ./python-package.nix { };
99     };
100   };
102 # See note in ./python-package.nix for
103 # instructions on manually testing the web UI
104 with python.pkgs; (toPythonApplication apache-airflow).overrideAttrs (previousAttrs: {
105   # Provide access to airflow's modified python package set
106   # for the cases where external scripts need to import
107   # airflow modules, though *caveat emptor* because many of
108   # these packages will not be built by hydra and many will
109   # not work at all due to the unexpected version overrides
110   # here.
111   passthru = (previousAttrs.passthru or { }) // {
112     pythonPackages = python.pkgs;
113   };