about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-08-02 18:00:41 +0200
committerTimo Kaufmann <timokau@zoho.com>2019-08-02 18:09:15 +0200
commitdac4719e0b05e7bfc95eb17a8cb8500b288ad019 (patch)
tree090bc42a2d29feede390ab921747d637c3ca04e5 /pkgs/applications/science
parentb9a7c07319a249d6d70447e1dcdad9419e61d7cc (diff)
downloadnixlib-dac4719e0b05e7bfc95eb17a8cb8500b288ad019.tar
nixlib-dac4719e0b05e7bfc95eb17a8cb8500b288ad019.tar.gz
nixlib-dac4719e0b05e7bfc95eb17a8cb8500b288ad019.tar.bz2
nixlib-dac4719e0b05e7bfc95eb17a8cb8500b288ad019.tar.lz
nixlib-dac4719e0b05e7bfc95eb17a8cb8500b288ad019.tar.xz
nixlib-dac4719e0b05e7bfc95eb17a8cb8500b288ad019.tar.zst
nixlib-dac4719e0b05e7bfc95eb17a8cb8500b288ad019.zip
sage: add patch to debug transient issue
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch19
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix6
2 files changed, 24 insertions, 1 deletions
diff --git a/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch b/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch
new file mode 100644
index 000000000000..e687281ad1a7
--- /dev/null
+++ b/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch
@@ -0,0 +1,19 @@
+diff --git a/src/sage/repl/configuration.py b/src/sage/repl/configuration.py
+index 67d7d2accf..18279581e2 100644
+--- a/src/sage/repl/configuration.py
++++ b/src/sage/repl/configuration.py
+@@ -9,10 +9,11 @@ the IPython simple prompt is being used::
+     sage: cmd = 'print([sys.stdin.isatty(), sys.stdout.isatty()])'
+     sage: import pexpect
+     sage: output = pexpect.run(
+-    ....:     'bash -c \'echo "{0}" | sage\''.format(cmd),
++    ....:     'bash -c \'export SAGE_BANNER=no; echo "{0}" | sage\''.format(cmd),
+     ....: ).decode('utf-8', 'surrogateescape')
+-    sage: 'sage: [False, True]' in output
+-    True
++    sage: print(output)
++    sage...[False, True]
++    sage...Exiting Sage ...
+ """
+ 
+ #*****************************************************************************
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index 51460154c5de..84c2ef3ec785 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -61,7 +61,11 @@ stdenv.mkDerivation rec {
   # Since sage unfortunately does not release bugfix releases, packagers must
   # fix those bugs themselves. This is for critical bugfixes, where "critical"
   # == "causes (transient) doctest failures / somebody complained".
-  bugfixPatches = [ ];
+  bugfixPatches = [
+    # To help debug the transient error in
+    # https://trac.sagemath.org/ticket/23087 when it next occurs.
+    ./patches/configurationpy-error-verbose.patch
+  ];
 
   # Patches needed because of package updates. We could just pin the versions of
   # dependencies, but that would lead to rebuilds, confusion and the burdons of