From 72e6e792f63e0a441f5fbd0f466e7b6124b24493 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sun, 28 Oct 2018 13:28:22 +0100 Subject: [PATCH] sage: add fetchSageDiff utility function --- pkgs/applications/science/math/sage/sage-src.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index f631fe38a5b0..f8e538b5053e 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -39,7 +39,19 @@ stdenv.mkDerivation rec { ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch ]; - packageUpgradePatches = [ + packageUpgradePatches = let + # fetch a diff between base and rev on sage's git server + # used to fetch trac tickets by setting the base to the release and the + # revision to the last commit that should be included + fetchSageDiff = { base, rev, ...}@args: ( + fetchpatch ({ + url = "https://git.sagemath.org/sage.git/patch?id2=${base}&id=${rev}"; + # We don't care about sage's own build system (which builds all its dependencies). + # Exclude build system changes to avoid conflicts. + excludes = [ "build/*" ]; + } // builtins.removeAttrs args [ "rev" "base" ]) + ); + in [ # New glpk version has new warnings, filter those out until upstream sage has found a solution # https://trac.sagemath.org/ticket/24824 ./patches/pari-stackwarn.patch # not actually necessary since tha pari upgrade, but necessary for the glpk patch to apply