tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Doc: fix python override examples
Frederik Rietdijk
9 years ago
95021f06
c7bbe3dd
+19
-5
1 changed file
expand all
collapse all
unified
split
doc
languages-frameworks
python.md
+19
-5
doc/languages-frameworks/python.md
···
715
715
In the following example we change the name of the package `pandas` to `foo`.
716
716
```
717
717
newpkgs = pkgs.overridePackages(self: super: rec {
718
718
-
python35Packages = super.python35Packages.override {
719
719
-
self = python35Packages // { pandas = python35Packages.pandas.override{name="foo";};};
718
718
+
python35Packages = (super.python35Packages.override { self = python35Packages;})
719
719
+
// { pandas = super.python35Packages.pandas.override {name = "foo";};
720
720
};
721
721
});
722
722
```
···
727
727
(let
728
728
729
729
newpkgs = pkgs.overridePackages(self: super: rec {
730
730
-
python35Packages = super.python35Packages.override {
731
731
-
self = python35Packages // { pandas = python35Packages.pandas.override{name="foo";};};
730
730
+
python35Packages = (super.python35Packages.override { self = python35Packages;})
731
731
+
// { pandas = super.python35Packages.pandas.override {name = "foo";};
732
732
};
733
733
});
734
734
in newpkgs.python35.withPackages (ps: [ps.blaze])
···
743
743
744
744
newpkgs = pkgs.overridePackages(self: super: rec {
745
745
python35Packages = super.python35Packages.override {
746
746
-
self = python35Packages // { scipy = python35Packages.scipy_0_16;};
746
746
+
self = python35Packages // { scipy = python35Packages.scipy_0_17;};
747
747
};
748
748
});
749
749
in newpkgs.python35.withPackages (ps: [ps.blaze])
750
750
).env
751
751
```
752
752
The requested package `blaze` depends upon `pandas` which itself depends on `scipy`.
753
753
+
754
754
+
A similar example but now using `django`
755
755
+
```
756
756
+
with import <nixpkgs> {};
757
757
+
758
758
+
(let
759
759
+
760
760
+
newpkgs = pkgs.overridePackages(self: super: rec {
761
761
+
python27Packages = (super.python27Packages.override {self = python27Packages;})
762
762
+
// { django = super.python27Packages.django_1_9; };
763
763
+
});
764
764
+
in newpkgs.python27.withPackages (ps: [ps.django_guardian ])
765
765
+
).env
766
766
+
```
753
767
754
768
### `python setup.py bdist_wheel` cannot create .whl
755
769