diff --git a/pkgs/development/python-modules/apache-airflow/default.nix b/pkgs/development/python-modules/apache-airflow/default.nix index 438dc46038cb..628cd7927311 100644 --- a/pkgs/development/python-modules/apache-airflow/default.nix +++ b/pkgs/development/python-modules/apache-airflow/default.nix @@ -238,12 +238,17 @@ buildPythonPackage rec { "--prefix PYTHONPATH : $PYTHONPATH" ]; + postInstall = '' + cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static + # Needed for pythonImportsCheck below + export HOME=$(mktemp -d) + ''; + pythonImportsCheck = [ "airflow" ] ++ providerImports; - checkPhase = '' - export HOME=$(mktemp -d) + preCheck = '' export AIRFLOW_HOME=$HOME export AIRFLOW__CORE__UNIT_TEST_MODE=True export AIRFLOW_DB="$HOME/airflow.db" @@ -262,10 +267,6 @@ buildPythonPackage rec { "bash_operator_kill" # psutil.AccessDenied ]; - postInstall = '' - cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static - ''; - # Updates yarn.lock and package.json passthru.updateScript = writeScript "update.sh" '' #!/usr/bin/env nix-shell