commit
7e3ba6cec3
@ -134,8 +134,6 @@ stdenv.mkDerivation rec {
|
||||
# https://github.com/NixOS/nixpkgs/pull/192548#discussion_r992824942
|
||||
rm -r "$out/share/gap/pkg"
|
||||
cp -ar pkg tst "$out/share/gap"
|
||||
|
||||
makeWrapper "$out/lib/gap/gap" "$out/bin/gap" --add-flags "-l $out/share/gap"
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, gmp
|
||||
, libX11
|
||||
, libpthreadstubs
|
||||
@ -25,6 +26,15 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-sEYoER7iKHZRmksc2vsy/rqjTq+iT56B9Y+NBX++4N0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2441
|
||||
(fetchpatch {
|
||||
name = "fix-find_isogenous_from_Atkin.patch";
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pari/patches/bug2441.patch?id=9.8.rc0";
|
||||
hash = "sha256-DvOUFlFDnopN+MJY6GYRPNabuoHPFch/nNn+49ygznc=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gmp
|
||||
libX11
|
||||
|
@ -10,7 +10,7 @@ First you should find out which change to nixpkgs is at fault (if you don't alre
|
||||
|
||||
If the build broke as a result of a package update, try those solutions in order:
|
||||
|
||||
- search the [sage trac](https://trac.sagemath.org/) for keywords like "Upgrade <package>". Maybe somebody has already proposed a patch that fixes the issue. You can then add a `fetchpatch` to `sage-src.nix`.
|
||||
- search the [sage GitHub repo](https://github.com/sagemath/sage) for keywords like "Upgrade <package>". Maybe somebody has already proposed a patch that fixes the issue. You can then add a `fetchpatch` to `sage-src.nix`.
|
||||
|
||||
- check if [gentoo](https://github.com/cschwan/sage-on-gentoo/tree/master/sci-mathematics/sage), [debian](https://salsa.debian.org/science-team/sagemath/tree/master/debian) or [arch linux](https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/sagemath) already solved the problem. You can then again add a `fetchpatch` to `sage-src.nix`. If applicable you should also [propose the patch upstream](#proposing-a-sage-patch).
|
||||
|
||||
@ -19,7 +19,7 @@ If the build broke as a result of a package update, try those solutions in order
|
||||
```
|
||||
[user@localhost ~]$ git clone https://github.com/sagemath/sage.git
|
||||
[user@localhost ~]$ cd sage
|
||||
[user@localhost sage]$ git checkout 8.2 # substitute the relevant version here
|
||||
[user@localhost sage]$ git checkout 9.8 # substitute the relevant version here
|
||||
```
|
||||
|
||||
Then make the needed changes and generate a patch with `git diff`:
|
||||
@ -29,42 +29,10 @@ Then make the needed changes and generate a patch with `git diff`:
|
||||
[user@localhost ~]$ git diff -u > /path/to/nixpkgs/pkgs/applications/science/math/sage/patches/name-of-patch.patch
|
||||
```
|
||||
|
||||
Now just add the patch to `sage-src.nix` and test your changes. If they fix the problem, [propose them upstream](#proposing-a-sage-patch) and add a link to the trac ticket.
|
||||
Now just add the patch to `sage-src.nix` and test your changes. If they fix the problem, submit a PR upstream (refer to sages [Developer's Guide](http://doc.sagemath.org/html/en/developer/index.html) for further details).
|
||||
|
||||
- pin the package version in `default.nix` and add a note that explains why that is necessary.
|
||||
|
||||
|
||||
## Proposing a sage patch
|
||||
|
||||
You can [login the sage trac using GitHub](https://trac.sagemath.org/login). Your username will then be `gh-<your-github-name>`. The only other way is to request a trac account via email. After that refer to [git the hard way](http://doc.sagemath.org/html/en/developer/manual_git.html#chapter-manual-git) in the sage documentation. The "easy way" requires a non-GitHub account (requested via email) and a special tool. The "hard way" is really not all that hard if you're a bit familiar with git.
|
||||
|
||||
Here's the gist, assuming you want to use ssh key authentication. First, [add your public ssh key](https://trac.sagemath.org/prefs/sshkeys). Then:
|
||||
|
||||
```
|
||||
[user@localhost ~]$ git clone https://github.com/sagemath/sage.git
|
||||
[user@localhost ~]$ cd sage
|
||||
[user@localhost sage]$ git remote add trac git@trac.sagemath.org:sage.git -t master
|
||||
[user@localhost sage]$ git checkout -b u/gh-<your-github-username>/<your-branch-name> develop
|
||||
[user@localhost sage]$ <make changes>
|
||||
[user@localhost sage]$ git add .
|
||||
[user@localhost sage]$ git commit
|
||||
[user@localhost sage]$ git show # review your changes
|
||||
[user@localhost sage]$ git push --set-upstream trac u/gh-<your-github-username>/<your-branch-name>
|
||||
```
|
||||
|
||||
You now created a branch on the trac server (you *must* follow the naming scheme as you only have push access to branches with the `u/gh-<your-github-username>/` prefix).
|
||||
Now you can [create a new trac ticket](https://trac.sagemath.org/newticket).
|
||||
- Write a description of the change
|
||||
- set the type and component as appropriate
|
||||
- write your real name in the "Authors" field
|
||||
- write `u/gh-<your-github-username>/<your-branch-name>` in the "Branch" field
|
||||
- click "Create ticket"
|
||||
- click "Modify" on the top right of your ticket (for some reason you can only change the ticket status after you have created it)
|
||||
- set the ticket status from `new` to `needs_review`
|
||||
- click "Save changes"
|
||||
|
||||
Refer to sages [Developer's Guide](http://doc.sagemath.org/html/en/developer/index.html) for further details.
|
||||
|
||||
## I want to update sage
|
||||
|
||||
You'll need to change the `version` field in `sage-src.nix`. Afterwards just try to build and let nix tell you which patches no longer apply (hopefully because they were adopted upstream). Remove those.
|
||||
@ -74,5 +42,5 @@ If the problem is not obvious, you can try to first update sage to an intermedia
|
||||
|
||||
## Well, that didn't help!
|
||||
|
||||
If you couldn't fix the problem, create a GitHub issue on the nixpkgs repo and ping @timokau (or whoever is listed in the `maintainers` list of the sage package).
|
||||
If you couldn't fix the problem, create a GitHub issue on the nixpkgs repo and ping the sage maintainers (as listed in the sage package).
|
||||
Describe what you did and why it didn't work. Afterwards it would be great if you help the next guy out and improve this documentation!
|
||||
|
@ -35,7 +35,8 @@ writeTextFile rec {
|
||||
export GRAPHS_DATA_DIR='${graphs}/share/graphs'
|
||||
export ELLCURVE_DATA_DIR='${elliptic_curves}/share/ellcurves'
|
||||
export POLYTOPE_DATA_DIR='${polytopes_db}/share/reflexive_polytopes'
|
||||
export GAP_ROOT_DIR='${gap}/share/gap'
|
||||
export GAP_LIB_DIR='${gap}/lib/gap'
|
||||
export GAP_SHARE_DIR='${gap}/share/gap'
|
||||
export ECLDIR='${maxima.lisp-compiler}/lib/${maxima.lisp-compiler.pname}-${maxima.lisp-compiler.version}/'
|
||||
export COMBINATORIAL_DESIGN_DATA_DIR="${combinatorial_designs}/share/combinatorial_designs"
|
||||
export CREMONA_MINI_DATA_DIR="${elliptic_curves}/share/cremona"
|
||||
|
@ -1,26 +0,0 @@
|
||||
diff --git a/src/sage/geometry/polyhedron/backend_normaliz.py b/src/sage/geometry/polyhedron/backend_normaliz.py
|
||||
index 86b89632a5..ca8a43b248 100644
|
||||
--- a/src/sage/geometry/polyhedron/backend_normaliz.py
|
||||
+++ b/src/sage/geometry/polyhedron/backend_normaliz.py
|
||||
@@ -53,7 +53,7 @@ def _number_field_elements_from_algebraics_list_of_lists_of_lists(listss, **kwds
|
||||
1.732050807568878?
|
||||
sage: from sage.geometry.polyhedron.backend_normaliz import _number_field_elements_from_algebraics_list_of_lists_of_lists
|
||||
sage: K, results, hom = _number_field_elements_from_algebraics_list_of_lists_of_lists([[[rt2], [1]], [[rt3]], [[1], []]]); results # optional - sage.rings.number_field
|
||||
- [[[-a^3 + 3*a], [1]], [[-a^2 + 2]], [[1], []]]
|
||||
+ [[[-a^3 + 3*a], [1]], [[a^2 - 2]], [[1], []]]
|
||||
"""
|
||||
from sage.rings.qqbar import number_field_elements_from_algebraics
|
||||
numbers = []
|
||||
diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py
|
||||
index d2b20f1891..6c31efe239 100644
|
||||
--- a/src/sage/lfunctions/pari.py
|
||||
+++ b/src/sage/lfunctions/pari.py
|
||||
@@ -339,7 +339,7 @@ def lfun_eta_quotient(scalings, exponents):
|
||||
0.0374412812685155
|
||||
|
||||
sage: lfun_eta_quotient([6],[4])
|
||||
- [[Vecsmall([7]), [Vecsmall([6]), Vecsmall([4])]], 0, [0, 1], 2, 36, 1]
|
||||
+ [[Vecsmall([7]), [Vecsmall([6]), Vecsmall([4]), 0]], 0, [0, 1], 2, 36, 1]
|
||||
|
||||
sage: lfun_eta_quotient([2,1,4], [5,-2,-2])
|
||||
Traceback (most recent call last):
|
@ -57,14 +57,14 @@ let
|
||||
);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "9.7";
|
||||
version = "9.8";
|
||||
pname = "sage-src";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sagemath";
|
||||
repo = "sage";
|
||||
rev = version;
|
||||
sha256 = "sha256-MYpCp18wqKwCa+tcJ7He14p1FXDlVm1vubQqQS9g3LY=";
|
||||
sha256 = "sha256-dDbrzJXsOBARYfJz0r7n3LbaoXHnx7Acz6HBa95NV9o=";
|
||||
};
|
||||
|
||||
# Patches needed because of particularities of nix or the way this is packaged.
|
||||
@ -89,14 +89,6 @@ stdenv.mkDerivation rec {
|
||||
# To help debug the transient error in
|
||||
# https://trac.sagemath.org/ticket/23087 when it next occurs.
|
||||
./patches/configurationpy-error-verbose.patch
|
||||
|
||||
# https://trac.sagemath.org/ticket/33907
|
||||
(fetchSageDiff {
|
||||
name = "interfaces-expectpy-intermittent.patch";
|
||||
base = "9.8.beta6";
|
||||
rev = "6f5c1c2fc8bcfb5e6555716d05ce70511795ffa1";
|
||||
sha256 = "sha256-z8FQxtrk62MHzPjrUTad+fMAE6XV8GTsLWKgGOM3zBg=";
|
||||
})
|
||||
];
|
||||
|
||||
# Patches needed because of package updates. We could just pin the versions of
|
||||
@ -119,28 +111,12 @@ stdenv.mkDerivation rec {
|
||||
# adapted from https://trac.sagemath.org/ticket/23712#comment:22
|
||||
./patches/tachyon-renamed-focallength.patch
|
||||
|
||||
# https://trac.sagemath.org/ticket/34118
|
||||
(fetchSageDiff {
|
||||
name = "sympy-1.11-upgrade.patch";
|
||||
base = "9.7";
|
||||
rev = "52815744bde2b682245b6f985a112f7cb8666056";
|
||||
sha256 = "sha256-gv6z6JkQ6S6oCJQNkVgcPVvzlplyvR1nC7pWmcUiSc0=";
|
||||
})
|
||||
|
||||
# https://trac.sagemath.org/ticket/34460
|
||||
(fetchSageDiff {
|
||||
name = "ipywidgets-8-upgrade.patch";
|
||||
base = "9.7";
|
||||
rev = "2816dbacb342398a23bb3099e20c92c8020ab0fa";
|
||||
sha256 = "sha256-tCOsMxXwPkRg3FJGVvTqDzlWdra78UfDY6nci0Nr9GI=";
|
||||
})
|
||||
|
||||
# https://trac.sagemath.org/ticket/34391
|
||||
(fetchSageDiff {
|
||||
name = "gap-4.12-upgrade.patch";
|
||||
base = "9.8.beta2";
|
||||
rev = "eb8cd42feb58963adba67599bf6e311e03424328";
|
||||
sha256 = "sha256-0dKewOZe2n3PqSdxCJt18FkqwTdrD0VA5MXAMiTW8Tw=";
|
||||
base = "9.8.beta7";
|
||||
rev = "dd4a17281adcda74e11f998ef519b6bd0dafb043";
|
||||
sha256 = "sha256-UQT9DO9xd5hh5RucvUkIm+rggPKu8bc1YaSI6LVYH98=";
|
||||
})
|
||||
|
||||
# https://trac.sagemath.org/ticket/34701
|
||||
@ -151,46 +127,6 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-9BhQLFB3wUhiXRQsK9L+I62lSjvTfrqMNi7QUIQvH4U=";
|
||||
})
|
||||
|
||||
# https://trac.sagemath.org/ticket/34537
|
||||
(fetchSageDiff {
|
||||
name = "pari-2.15.1-upgrade.patch";
|
||||
squashed = true;
|
||||
base = "54cd6fe6de52aee5a433e0569e8c370618cb2047"; # 9.8.beta1
|
||||
rev = "1e86aa26790d84bf066eca67f98a60a8aa3d4d3a";
|
||||
sha256 = "sha256-LUgcMqrKXWb72Kxl0n6MV5unLXlQSeG8ncN41F7TRSc=";
|
||||
excludes = ["build/*"
|
||||
"src/sage/geometry/polyhedron/base_number_field.py"
|
||||
"src/sage/geometry/polyhedron/backend_normaliz.py"
|
||||
"src/sage/lfunctions/pari.py"];
|
||||
})
|
||||
# Some files were excluded from the above patch due to
|
||||
# conflicts. The patch below contains rebased versions.
|
||||
./patches/pari-2.15.1-upgrade-rebased.patch
|
||||
|
||||
# https://trac.sagemath.org/ticket/34668
|
||||
(fetchSageDiff {
|
||||
name = "matplotlib-3.6-upgrade.patch";
|
||||
base = "9.8.beta2";
|
||||
rev = "5501e0de0dca1cff0355326dd42bd8c7e5749568";
|
||||
sha256 = "sha256-ceJkVaecIsZewN8v/3gPQXFbFjv5Akz6zEFg/ToXdek=";
|
||||
})
|
||||
|
||||
# https://trac.sagemath.org/ticket/34693
|
||||
(fetchSageDiff {
|
||||
name = "matplotlib-3.6-docbuilding.patch";
|
||||
base = "9.8.beta4";
|
||||
rev = "64589686c261d33e6b5aff2589bcae8af004bcc6";
|
||||
sha256 = "sha256-j5AMY1TmhP+HBBBYaFZSkABJ5vtwe6iP2LRfGEgSm8Q=";
|
||||
})
|
||||
|
||||
# https://trac.sagemath.org/ticket/34615
|
||||
(fetchSageDiff {
|
||||
name = "sphinx-5.2-upgrade.patch";
|
||||
base = "9.8.beta1";
|
||||
rev = "8f8af65e54d3a9962cfab40f15dc23f4e955b43f";
|
||||
sha256 = "sha256-yhDdyxnXSSkqLcuOPBWSEBc26rk1Od3gLcWW8S2p8bY=";
|
||||
})
|
||||
|
||||
# temporarily paper over https://github.com/jupyter-widgets/ipywidgets/issues/3669
|
||||
./patches/ipywidgets-on_submit-deprecationwarning.patch
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ lib, stdenv
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, makeWrapper
|
||||
, which
|
||||
, autoconf
|
||||
@ -20,7 +21,14 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "132l0xv00ld1svvv9wh99wfra4zzjv2885h2sq0dsl98wiyvi5zl";
|
||||
};
|
||||
|
||||
patches = [ ./clean-extra-logfile-output-from-pari.patch ];
|
||||
patches = [
|
||||
./clean-extra-logfile-output-from-pari.patch
|
||||
(fetchpatch {
|
||||
name = "null-terminate-dupdirname.patch";
|
||||
url = "https://gitlab.com/rezozer/forks/sympow/-/merge_requests/5.diff";
|
||||
sha256 = "sha256-yKjio+qN9teL8L+mb7WOBN/iv545vRIxW20FJU37oO4=";
|
||||
})
|
||||
];
|
||||
|
||||
postUnpack = ''
|
||||
patchShebangs .
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, buildPythonPackage
|
||||
, pkgconfig
|
||||
, gmp
|
||||
@ -16,23 +15,15 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fpylll";
|
||||
version = "0.5.7";
|
||||
version = "0.5.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fplll";
|
||||
repo = "fpylll";
|
||||
rev = version;
|
||||
sha256 = "sha256-iUPreJ8BSB8LDisbJis0xn8ld6+Nf9Z4AP8SWJlCfZg=";
|
||||
sha256 = "sha256-T6l6hKzRDevlLyLu5H+bnEdl0OhsPer1coCDiftbPAk=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "remove-strategies-doctest.patch";
|
||||
url = "https://github.com/fplll/fpylll/commit/3edffcd189e9d827a322d83b0f84d32e5f067442.patch";
|
||||
sha256 = "sha256-U7qOIbVzUNwYmjOPryjnE3J+MX/vMwm3T0UyOZ5ylLc=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gmp
|
||||
pari
|
||||
|
Loading…
Reference in New Issue
Block a user