python-docs: fix override examples
Use example package `zerobin` instead of `bepasty-server` which is no longer part of python-packages. This fixes the examples for current nixpkgs versions.
This commit is contained in:
parent
42e3727aa2
commit
fa01100f40
|
@ -1009,11 +1009,11 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
|
||||||
nixpkgs.config.packageOverrides = super: {
|
nixpkgs.config.packageOverrides = super: {
|
||||||
python = super.python.override {
|
python = super.python.override {
|
||||||
packageOverrides = python-self: python-super: {
|
packageOverrides = python-self: python-super: {
|
||||||
bepasty-server = python-super.bepasty-server.overrideAttrs (oldAttrs: {
|
zerobin = python-super.zerobin.overrideAttrs (oldAttrs: {
|
||||||
src = super.fetchgit {
|
src = super.fetchgit {
|
||||||
url = "https://github.com/bepasty/bepasty-server";
|
url = "https://github.com/sametmax/0bin";
|
||||||
rev = "e2516e8cf4f2afb5185337073607eb9e84a61d2d";
|
rev = "a344dbb18fe7a855d0742b9a1cede7ce423b34ec";
|
||||||
sha256 = "9ziqshmsf0rjvdhhca55sm0x8jz76fsf2q4rwh4m6lpcf8wr0nps";
|
sha256 = "16d769kmnrpbdr0ph0whyf4yff5df6zi4kmwx7sz1d3r6c8p6xji";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1021,7 +1021,8 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are using the `bepasty-server` package somewhere, for example in `systemPackages` or indirectly from `services.bepasty`, then a `nixos-rebuild switch` will rebuild the system but with the `bepasty-server` package using a different `src` attribute. This way one can modify `python` based software/libraries easily.
|
`pythonPackages.zerobin` is now globally overriden. All packages and also the
|
||||||
|
`zerobin` NixOS service use the new definition.
|
||||||
Note that `python-super` refers to the old package set and `python-self`
|
Note that `python-super` refers to the old package set and `python-self`
|
||||||
to the new, overridden version.
|
to the new, overridden version.
|
||||||
|
|
||||||
|
@ -1030,7 +1031,7 @@ To modify only a Python package set instead of a whole Python derivation, use th
|
||||||
```nix
|
```nix
|
||||||
myPythonPackages = pythonPackages.override {
|
myPythonPackages = pythonPackages.override {
|
||||||
overrides = self: super: {
|
overrides = self: super: {
|
||||||
bepasty-server = ...;
|
zerobin = ...;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -1044,11 +1045,11 @@ self: super:
|
||||||
{
|
{
|
||||||
python = super.python.override {
|
python = super.python.override {
|
||||||
packageOverrides = python-self: python-super: {
|
packageOverrides = python-self: python-super: {
|
||||||
bepasty-server = python-super.bepasty-server.overrideAttrs (oldAttrs: {
|
zerobin = python-super.zerobin.overrideAttrs (oldAttrs: {
|
||||||
src = self.pkgs.fetchgit {
|
src = super.fetchgit {
|
||||||
url = "https://github.com/bepasty/bepasty-server";
|
url = "https://github.com/sametmax/0bin";
|
||||||
rev = "e2516e8cf4f2afb5185337073607eb9e84a61d2d";
|
rev = "a344dbb18fe7a855d0742b9a1cede7ce423b34ec";
|
||||||
sha256 = "9ziqshmsf0rjvdhhca55sm0x8jz76fsf2q4rwh4m6lpcf8wr0nps";
|
sha256 = "16d769kmnrpbdr0ph0whyf4yff5df6zi4kmwx7sz1d3r6c8p6xji";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue