From 138565e8df3ff7673a383dfa7a66a069ddc2c310 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 12 Jun 2023 21:46:00 +0800 Subject: [PATCH] apache-airflow: fix passthru overriding Keep the `passthru` attributes from previousAttrs while adding new attributes. Co-authored-by: Graham Bennett --- pkgs/servers/apache-airflow/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/apache-airflow/default.nix b/pkgs/servers/apache-airflow/default.nix index e3b3f0ddc20f..7889cf516e7a 100644 --- a/pkgs/servers/apache-airflow/default.nix +++ b/pkgs/servers/apache-airflow/default.nix @@ -43,12 +43,14 @@ let in # See note in ./python-package.nix for # instructions on manually testing the web UI -with python.pkgs; (toPythonApplication apache-airflow).overrideAttrs (_:{ +with python.pkgs; (toPythonApplication apache-airflow).overrideAttrs (previousAttrs: { # Provide access to airflow's modified python package set # for the cases where external scripts need to import # airflow modules, though *caveat emptor* because many of # these packages will not be built by hydra and many will # not work at all due to the unexpected version overrides # here. - passthru.pythonPackages = python.pkgs; + passthru = (previousAttrs.passthru or { }) // { + pythonPackages = python.pkgs; + }; })