From 2b6cde5354dc21362b30113ebb2f63dd1c384762 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Sat, 1 Feb 2025 23:44:23 +0800 Subject: [PATCH] buildPython*: move argument-dependent let-in variables down below finalAttrs This commit is intentionally unformatted for smoother merging and rebasing experience. --- .../interpreters/python/mk-python-derivation.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index 39263a887639..3f919a095df7 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -206,6 +206,11 @@ in }@attrs: let + # Keep extra attributes from `attrs`, e.g., `patchPhase', etc. + self = ( + stdenv.mkDerivation ( + finalAttrs: + let format' = assert (pyproject != null) -> (format == null); if pyproject != null then @@ -270,10 +275,7 @@ let isSetuptoolsDependency = isSetuptoolsDependency' (attrs.pname or null); - # Keep extra attributes from `attrs`, e.g., `patchPhase', etc. - self = ( - stdenv.mkDerivation ( - finalAttrs: + in (cleanAttrs attrs) // {