Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
pyspread: Correct dependencies and make wrapper #94537
Change dependent python version to 3.6-3.9
Motivation for this change
pyspread 1.99.x depends on Python 3.6-3.9 and pyqt5 instead of Python 2.7, wxPython or pygtk. Some dependent packages have also dropped Python2 support.
It is the first time for me to package a Python application (rewrite the expressions of a package) in nixpkgs.
pyspread-unwrapped is supposed to be imported as a module, while pyspread is supposed to be executed as an application. Rename default.nix to unwrapped.nix and remove unnecesary dependencies This is where `pyspread-unwrapped` is called. Create default.nix for the executable application, symlink share items and put desktop file into it, and try to wrap with mkDerivationWith and wrapQtApp. This is where `pyspread` is called.
jonringer left a comment
If this is just meant to be just the application, and you don't need to export the package as a python package, then it should probably be moved out of
then you would just do something like:
@jonringer Thank you for reviewing.
Users may also want extra packages when writing those expressions. Since
There is also an API to be imported in python scripts, and that's the reason I preserve pyspread-unwrapped.
The python package is now called `pyspread` to meet the convensions and pyspread-app is the new name of the executable package. Rewrite the wrapping part to adopt the advice from the reviewer and to make it more clearly and easier to compile. Package the wrapping process as a function available for NixOS or home-manareg modules and users.
Change the output way to make overriding easier. pyspread-app is now a set containing pyspread-app.app: the workable application pyspread-app.wrapPyspread: the wrapping function .pickRequiredDeps, .pickOptionalDeps: functions to get deps from the given package set.