python-packages: Set pythonPackages attr in pythonPackages scope

If we don't set this we are mixing python versions in the same package.
Any package called from `python-packages.nix` using `pythonPackages` directly as an argument is currently wrong.

Before:
```
nix-repl> python3Packages.bugseverywhere.buildInputs
[ «derivation /nix/store/csd0d2j3vgl5dnag6afi5q92xb64rv7z-python2.7-Jinja2-2.10.1.drv» «derivation /nix/store/gsj389hprxlr8a39b0ccszagirirf1lv-python2.7-cherrypy-17.4.1.drv» «derivation /nix/store/ysmd4wdkbi9gd6bw2ha92hwrd2k2xlnh-python2.7-bootstrapped-pip-19.0.3.drv» ]
```

After:
```
nix-repl> python3Packages.bugseverywhere.buildInputs
[ «derivation /nix/store/m0mfx1i98ciby8mx8xjva98kinhqkj6r-python3.7-Jinja2-2.10.1.drv» «derivation /nix/store/2gqd0sbiwqmin2814ja83pnyal8pq86a-python3.7-cherrypy-18.1.1.drv» «derivation /nix/store/0rq8n7xq2ksxiq2y2d844i9516p0rd41-python3.7-bootstrapped-pip-19.0.3.drv» ]
```
This commit is contained in:
adisbladis 2019-05-08 12:56:53 +01:00
parent 84a51650b9
commit 160261b72d
No known key found for this signature in database
GPG Key ID: 110BFAD44C6249B7

@ -130,6 +130,9 @@ in {
wrapPython = callPackage ../development/interpreters/python/wrap-python.nix {inherit python; inherit (pkgs) makeSetupHook makeWrapper; };
# Dont take pythonPackages from "global" pkgs scope to avoid mixing python versions
pythonPackages = self;
# specials
recursivePthLoader = callPackage ../development/python-modules/recursive-pth-loader { };