From 9d87f178edb75e42633703a4cb7cfc351bea897a Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sun, 26 Oct 2025 08:40:40 +0000 Subject: [PATCH] buildPython*: switch overrideStdenvCompat to mirrorFunctionArgs The underlying `mk-python-derivation.nix` functions do not have `stdenv` in their functionArgs, so it was redundant to explicitly remove it. --- .../interpreters/python/python-packages-base.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/python-packages-base.nix b/pkgs/development/interpreters/python/python-packages-base.nix index ff0699365ef3..61cf3f2b941b 100644 --- a/pkgs/development/interpreters/python/python-packages-base.nix +++ b/pkgs/development/interpreters/python/python-packages-base.nix @@ -45,16 +45,16 @@ let overrideStdenvCompat = f: - lib.setFunctionArgs ( + lib.mirrorFunctionArgs f ( args: if !(lib.isFunction args) && (args ? stdenv) then lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2511) '' Passing `stdenv` directly to `buildPythonPackage` or `buildPythonApplication` is deprecated. You should use their `.override` function instead, e.g: buildPythonPackage.override { stdenv = customStdenv; } { } - '' (f.override { stdenv = args.stdenv; } args) + '' (f.override { inherit (args) stdenv; } args) else f args - ) (removeAttrs (lib.functionArgs f) [ "stdenv" ]) + ) // { # Intentionally drop the effect of overrideStdenvCompat when calling `buildPython*.override`. inherit (f) override;