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