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

Python: common method for overriding of libraries #24154

Closed
FRidh opened this issue Mar 21, 2017 · 2 comments
Closed

Python: common method for overriding of libraries #24154

FRidh opened this issue Mar 21, 2017 · 2 comments

Comments

@FRidh
Copy link
Member

FRidh commented Mar 21, 2017

Issue description

Most Python library expressions are in python-packages.nix and some are called using callPackage.
We applied makeOverridable to buildPythonPackage so we can override the Python packages. However, callPackage = pkgs.newScope self; also sets a override attribute which is applied later thus taking precedence. We should provide a common method for overriding Python libraries.

Possible methods I can think of:

  • Define callPackage without providing a override attribute. The override attribute should now correspond to the one added to buildPythonPackage by makeOverridable.
  • Add a buildPythonPackage.overridePythonPackage method.

I suppose the first would be easiest and the second the most robust.


It would by the way be nice if makeOverridable would allow you to set the attribute used for overriding.

@FRidh
Copy link
Member Author

FRidh commented Mar 21, 2017

cc @copumpkin @lsix @Mic92 @abbradar

See also the implementation at #24155. Seems to work for me.

@FRidh FRidh modified the milestone: 17.03 Mar 21, 2017
@FRidh
Copy link
Member Author

FRidh commented May 15, 2018

This went in already a long time ago.

@FRidh FRidh closed this as completed May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant