From de50d08d7395dba80e66cdec0321a070becd6650 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Mon, 27 Jun 2022 11:44:20 +0200 Subject: [PATCH] buildPythonPackage: document why we always propagate python python applications should not propagate python in PATH but we do it nevertheless to avoid rebuilds see https://github.com/NixOS/nixpkgs/issues/170887 for an explanation. --- .../interpreters/python/mk-python-derivation.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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;