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) // {