about summary refs log tree commit diff
path: root/doc/cross-compilation.xml
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-03-21 10:08:10 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2017-08-09 11:10:54 +0200
commit345b35c48af0c6534fc649ef4b2050ebf0b91d50 (patch)
tree0609075a939f31769ac494062dc634f009083577 /doc/cross-compilation.xml
parent90282d95bd5c468a10bd06315023830a752918e2 (diff)
downloadnixlib-345b35c48af0c6534fc649ef4b2050ebf0b91d50.tar
nixlib-345b35c48af0c6534fc649ef4b2050ebf0b91d50.tar.gz
nixlib-345b35c48af0c6534fc649ef4b2050ebf0b91d50.tar.bz2
nixlib-345b35c48af0c6534fc649ef4b2050ebf0b91d50.tar.lz
nixlib-345b35c48af0c6534fc649ef4b2050ebf0b91d50.tar.xz
nixlib-345b35c48af0c6534fc649ef4b2050ebf0b91d50.tar.zst
nixlib-345b35c48af0c6534fc649ef4b2050ebf0b91d50.zip
Python: add buildPythonPackage.overridePythonPackage method.
This allows one to always override the call to `buildPythonPackage`.

In the following example we create an environment where we have the `blaze` package using an older version of `pandas`. We override first the Python interpreter and pass `packageOverrides` which contains the overrides for packages in
the package set.

```
with import <nixpkgs> {};

(let
  python = let
    packageOverrides = self: super: {
      pandas = super.pandas.overridePythonPackage(old: rec {
        version = "0.19.1";
        name = "pandas-${version}";
        src =  super.fetchPypi {
          pname = "pandas";
          inherit version;
          sha256 = "08blshqj9zj1wyjhhw3kl2vas75vhhicvv72flvf1z3jvapgw295";
        };
      });
    };
  in pkgs.python3.override {inherit packageOverrides;};

in python.withPackages(ps: [ps.blaze])).env
```
Diffstat (limited to 'doc/cross-compilation.xml')
0 files changed, 0 insertions, 0 deletions