diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index 4917b167046..f37ad592cb4 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -148,7 +148,12 @@ let buildInputs = buildInputs ++ pythonPath; - propagatedBuildInputs = propagatedBuildInputs ++ [ python ]; + propagatedBuildInputs = propagatedBuildInputs ++ [ + # we propagate python even for packages transformed with 'toPythonApplication' + # this pollutes the PATH but avoids rebuilds + # see https://github.com/NixOS/nixpkgs/issues/170887 for more context + python + ]; inherit strictDeps;