doc: use idiomatic overlay names in the python manual example#87440
Conversation
An overlay by any other name would function just as well, but we generally use `self: super:` for the regular overlays, and `python-self: python-super`.
|
since this is a python-overrides, this makes sense |
| newpkgs = import pkgs.path { overlays = [ (self: super: { | ||
| python38 = let | ||
| packageOverrides = python-self: python-super: { | ||
| numpy = python-super.numpy_1_18.3; |
There was a problem hiding this comment.
Typo
python-super.numpy_1_18.3
Point is incorrect, and this package does not exist. Note also that, if we add a version, we try to be as unspecific as possible. Patch version you typically do not want to pin to, but major or minor you would. This, numpy_1_18 is a better value.
There was a problem hiding this comment.
Argh, you're right. I also don't particularly like this example, as most of the time we just have 1 version of a package and the "real" way you have to do it is by using overrideAttrs to re-fetch pypi and your src.
Ideally we'd either make it the more heavyweight example (with the full src fetch on the chosen version), or swap it to an example showing how to do something like build pytorch with cuda (except that doesn't work at the moment and is proprietary).
An overlay by any other name would function just as well, but we generally use
self: super:for the regular overlays, andpython-self: python-super.Another improvement after reading thorugh the docs from #87094