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
Sage on nixos #39981
Sage on nixos #39981
Conversation
|
Thanks :) Oh right the |
I'm not sure about the ofBorg error, it appears to have something to do with the node packages. I'm not sure about those anyways, I'm still hoping for some feedback from someone who knows more about node packaging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @timokau , it is good to see this all together.
I went through it, and then the changes look good to me, although I am still of the opinion we should not be adding old and unmaintained packages to Nixpkgs. Therefore, if these dependencies are really needed, I suggest you move them under the scope of sage
and out of python-packages.nix
and python-modules/
.
@FRidh I am not sure if it is fully correct to call such packages unmaintained, as the Sage team is clearly capable and quite likely to perform maintenance on these packages if unavoidable (of course they can also drop the dependency, in which case we would find out the packages were indeed unmaintained along the way…) On the other hand, maybe they are not worth putting in the global Python namespace, just as |
@FRidh I've moved flask-oldsessions, flask-openid and python-openid under the sage scope. Status update: I have removed all unnecessary dependencies and made lots of minor improvements. I'm I'll also have to figure out how Other than that all the dependencies except the python patches have been merged. Also |
Can somebody (@7c6f434c, @FRidh?) help me figure out how to avoid all the Could someone give me a minimal example how to create a new scope that overrides one python package and one regular pacakge? Something like:
|
I am not sure about proper structure of overrides for Nixpkgs nowadays.
Reimporting nixpkgs replacing user overlays with a sage-related one may
also be counterintuitive.
I am pretty sure you want something like:
self: super: rec {
pkg1 = super.pkg1.override {…};
callPackage = super.newScope self;
pkg2 = callPackage … { };
}
|
That defines a function right? But where do I call that function / give it as an argument? |
I am not sure — reimporting with overlays sound dirty, packageOverrides are deprecated… |
Yeah reimporting with overlays is what the manual suggested, but I think thats probably a different use-case. Do you know who to ask? |
Oh? Maybe look up in git who added that advice to ask if it applies in the case you want…
|
Alright I think this is ready for review now. The only remaining blocker for merge is #39555. Once thats merged and through staging I will rebase this PR. If I can clarify anything, let me know. |
thanks that's an awesome contribution. I wanted to use sage at some point, had some problems, wanted to fix it but gave up when facing the huge task (plus sage developers don't seem too receptive about packaging concerns). I am no maintainer but I believe merging the new packages in one or several PRs would make things easier. I've seen that a maintainer didn't want merging one (old) python package but I would advocate that sage is worth it ? |
You're welcome :)
There is some work ongoing upstream, but its not as much of an priority as I would like, true. I have also suggested all my relevant changes upstream[1] and at least none of them have been flat out rejected yet. So hopefully it will get better in the future.
I have already split most new packages, package fixes and package updates in seperate PRs (lots of them). They've all been merged by now. The only things remaining are the pythong packages @FRidh doesn't want in the main tree, packages that don't make any sense without sage (like pybrial) and sage itself. I think more or less the only thing blocking this PR is #39555, which is itself only blocked on the staging branch being a mess right now (not sure if thats still the case). So once staging is cleaned up, #39555 can be merged into staging. Then we have to wait for staging to be merged into master and then this can be merged. |
Finally all the dependencies are in master. I've cleaned up the history and rebased on nixpkgs-unstable for easier testing. I think this is ready for test/merge. @GrahamcOfBorg build sage.lib |
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: sage.lib Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: sage.lib Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: sage.lib Partial log (click to expand)
|
Not actually needed by any package and adds and indirect dependency to atlas.
Fixes the build with current flask, which deprecated the old import syntax.
Fixes the build with current flask, which deprecated the old import syntax.
Oh that must've been a mistake while fixing some merge conflict because I assumed that was my version of python-openid. I've rebased on latest master. Since python-openid for python2 is removed there, the eval should succeed now. |
@timokau re: batch updates: when upstream of the language ecosystem has a package manager, it makes sense to track it via batch updates because the outcome is easier to reason about when comparing to the upstream situation. |
Why is that? Python packages can depend on specific version (ranges) and if a update builds in nixpkgs and doesn't break any reverse-dependencies, I see no reason not to include it right then. |
It's simply that just a small percentage of the python packages would be updated at all if we didn't have batch upgrades. And since the batch upgrades only happen on the unstable channel, people encountering broken builds should expect that this happens from time to time. Before a new release, we try to stabilize the python package set. |
Removes the version pinning for arb and pynac by backporting the upstream (sage) package upgrades. This necessitates a new patch for arb, which was however already proposed and accepted upstream.
Lets continue the python discussion here: https://discourse.nixos.org/t/continuation-discussion-about-python-infrastructure/441. Back to topic: I've added another commit that un-pins two dependencies. I think that can remain its own commit, since it touches the arb packages as well and is a good example of the kind of maintenance work that will be needed to keep sage working. Since this has been open and ready for review without major changes or objections for a while now, can we merge this? Maybe someone else can verify that sage builds for them before that. But I've rebuild from scratch after garbage-collecting, so I would be surprised if someone else got different results. |
The patch was replaced by a better upstream patch that doesn't mvoe the jupyter dir to the user's home.
And a semi-related note: I think you should ask to get commit rights; while it might make sense to keep a Sage update in a PR while it is a WIP, and to discuss with @FRidh if you want a non-default version of a python package from a maintained branch, it is quite likely that reviewing your sage changes is useless because you have learnt about Sage much more than everyone else counted together. Also, I do think you have enough experience that your opinion about a PR «ah, it's just an uncontroversial update and it is ready to merge» is as good as anyone's. |
Congrats ! thanks for the awesome work to all involved. |
Thanks for merging! @teto you seem very interested in this package. Please don't hesitate to make improvements, fix bugs or ask questions if something is unclear! It would be nice to have a bus factor > 1.
Sounds good :) What is the process for that? |
@rbvermaa @domenkozar I think it is a good idea to give @timokau write access. |
@timokau in the meantime, do you have 2FA enabled on GitHub? |
Yes I have. |
@rbvermaa @domenkozar was this ever discussed? |
Motivation for this change
The current sage package rebuilds all its dependencies with its own build system. Thats a mess:
So this PR builds all the dependencies with nix instead. All the tests are passing.
It depends on (and includes) #39555,
#39405,#38794(without tests),#38787and thempfr update in staging. #39405 is responsible for most of the diff.It is not quite ready to merge yet, because it updates to sage 8.2.rc4 (last rc) which is not released yet and I still need to fix some FIXMEs, do some TODOs, document patches and remove redundant dependencies.I'm creating this WIP PR because 8.2 is about to be released and I don't want anybody else wasting time updating sage.
Testing this will take a lot of rebuilding because of the mpfr update (stdenv) and the python patch.
If you want to review, your time is probably best spend waiting until I'm finished. If you want to give feedback already, that is of course welcome.Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)