apache-airflow: fix build on darwin

- Disable failing test on darwin.
- Patch failing test on Hydra (failed to write to /tmp)
This commit is contained in:
Sebastián Mancilla 2021-11-19 21:35:17 -03:00
parent ec05219e40
commit 21d4d1bfda

View file

@ -199,6 +199,10 @@ buildPythonPackage rec {
substituteInPlace tests/core/test_core.py \
--replace "/bin/bash" "${stdenv.shell}"
'' + lib.optionalString stdenv.isDarwin ''
# Fix failing test on Hydra
substituteInPlace airflow/utils/db.py \
--replace "/tmp/sqlite_default.db" "$TMPDIR/sqlite_default.db"
'';
# allow for gunicorn processes to have access to python packages
@ -220,6 +224,10 @@ buildPythonPackage rec {
"tests/core/test_core.py"
];
disabledTests = lib.optionals stdenv.isDarwin [
"bash_operator_kill" # psutil.AccessDenied
];
postInstall = ''
cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static
'';