diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 28826768cd0b..da76fb682b39 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -293,29 +293,23 @@ the overrides for packages in the package set. ```nix with import { }; -( - let - python = - let - packageOverrides = self: super: { - pandas = super.pandas.overridePythonAttrs (old: rec { - version = "0.19.1"; - src = fetchPypi { - pname = "pandas"; - inherit version; - hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE="; - }; - }); - }; - in - pkgs.python3.override { - inherit packageOverrides; - self = python; - }; - - in - python.withPackages (ps: [ ps.blaze ]) -).env +let + python = pkgs.python3.override { + packageOverrides = self: super: { + pandas = super.pandas.overridePythonAttrs ( + finalAttrs: prevAttrs: { + version = "0.19.1"; + src = fetchPypi { + pname = "pandas"; + inherit (finalAttrs) version; + hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE="; + }; + } + ); + }; + }; +in +(python.withPackages (ps: [ ps.blaze ])).env ``` The next example shows a non trivial overriding of the `blas` implementation to