diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index 24791a6c41ea5..11bb1af773ee9 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -205,10 +205,9 @@ in ... }@attrs: -assert (pyproject != null) -> (format == null); - let format' = + assert (pyproject != null) -> (format == null); if pyproject != null then if pyproject then "pyproject" else "other" else if format != null then @@ -274,6 +273,7 @@ let # Keep extra attributes from `attrs`, e.g., `patchPhase', etc. self = toPythonModule ( stdenv.mkDerivation ( + finalAttrs: (cleanAttrs attrs) // { @@ -400,13 +400,12 @@ let { inherit disabled; } - // attrs.passthru or { } // { updateScript = let - filename = head (splitString ":" self.meta.position); + filename = head (splitString ":" finalAttrs.finalPackage.meta.position); in - attrs.passthru.updateScript or [ + [ update-python-libraries filename ]; @@ -419,7 +418,8 @@ let } // optionalAttrs (build-system != [ ]) { inherit build-system; - }; + } + // attrs.passthru or { }; meta = { # default to python's platforms