The better way to fix this would be to backport the upstream sphinx
patch:
faedcc48cc
Unfortunately it doesn't apply cleanly and isn't worth the effort
of backporting. Let's hope we can switch to python3 sage and the recent
sphinx version that comes with it before this becomes a problem.
cmp is deprecated since attrs 19.2.0:
http://www.attrs.org/en/19.2.0/changelog.html
The deprecation warning breaks the doctests. Fortunately they have a
rather long deprecation window, so we can just wait until upstream(s)
fix this.
Sage now by default expects the lcalc library to be named Lfunction
(instead of libLfunction). This could be changed by an environment
variable (https://trac.sagemath.org/ticket/28224), but various distros
seem to agree on this standard
(https://groups.google.com/forum/#!topic/sage-packaging/xvh55IxHTZg) so
it's best just to follow it. The old standard was set by sage anyway and
sage is the only consumer of lcalc in nixpkgs.
The docbuild (or rather its tests) failed because sphinx built some
English parts of the documentation in Russian. The added debian patch
fixes that by isolating docbuilding threads in sphinx using
proper subprocesses.
pip 19 introduced a deprecation warning for python 2.7. Since sage
internally uses pip to query for installed packages, this deprecation
warning will show up at unexpected times. That is ugly and messes with
the testsuite.
Upstream: https://trac.sagemath.org/ticket/27405
Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
For some reason I changed it to use `cgit`s `rawdiff` instead of `patch`
in the update to sage 8.6. Probably commited that by accident, at least
I can't remember the reason. Also changed the excludes filter, the
leading slash prevented it from working.
As a result, the cypari2 patch changed. Only didn't notice because it
was cached.
Fixes #55780