Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: use idiomatic overlay names in the python manual example #87440

Merged
merged 1 commit into from May 10, 2020

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented May 9, 2020

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.

Another improvement after reading thorugh the docs from #87094

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`.
@jonringer
Copy link
Contributor

since this is a python-overrides, this makes sense

@bhipple bhipple merged commit bc8e621 into NixOS:master May 10, 2020
newpkgs = import pkgs.path { overlays = [ (self: super: {
python38 = let
packageOverrides = python-self: python-super: {
numpy = python-super.numpy_1_18.3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overridePythonAttrs ;-) NixOS/rfcs#67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants