Commit f8f04a97 authored by Doron Behar's avatar Doron Behar
Browse files

doc/python: simplify packageOverrides example

parent bfa489d7
Loading
Loading
Loading
Loading
+17 −23
Original line number Diff line number Diff line
@@ -293,29 +293,23 @@ the overrides for packages in the package set.
```nix
with import <nixpkgs> { };

(
  let
    python =
let
  python = pkgs.python3.override {
    packageOverrides = self: super: {
          pandas = super.pandas.overridePythonAttrs (old: rec {
      pandas = super.pandas.overridePythonAttrs (
        finalAttrs: prevAttrs: {
          version = "0.19.1";
          src = fetchPypi {
            pname = "pandas";
              inherit version;
            inherit (finalAttrs) version;
            hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE=";
          };
          });
        }
      );
    };
      in
      pkgs.python3.override {
        inherit packageOverrides;
        self = python;
  };

in
  python.withPackages (ps: [ ps.blaze ])
).env
(python.withPackages (ps: [ ps.blaze ])).env
```

The next example shows a non trivial overriding of the `blas` implementation to