summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2020-01-22 00:39:54 +0100
committerTimo Kaufmann <timokau@zoho.com>2020-01-23 09:40:14 +0100
commit66675b5650b63e2aecd4ceef4d34f1a1d56b9c95 (patch)
tree6ceb840c7ab698ff38cc0cacc84095df1f1cfed0 /pkgs/development/python-modules
parent50c661c4476c96dfa5cd1ca8843ee16b4b1111aa (diff)
downloadnixpkgs-66675b5650b63e2aecd4ceef4d34f1a1d56b9c95.tar
nixpkgs-66675b5650b63e2aecd4ceef4d34f1a1d56b9c95.tar.gz
nixpkgs-66675b5650b63e2aecd4ceef4d34f1a1d56b9c95.tar.bz2
nixpkgs-66675b5650b63e2aecd4ceef4d34f1a1d56b9c95.tar.lz
nixpkgs-66675b5650b63e2aecd4ceef4d34f1a1d56b9c95.tar.xz
nixpkgs-66675b5650b63e2aecd4ceef4d34f1a1d56b9c95.tar.zst
nixpkgs-66675b5650b63e2aecd4ceef4d34f1a1d56b9c95.zip
python2.pkgs.ipython: use the proper python2 lexer
Since pygments 2.5 `PythonLexer` refers to python3 [1]. We have to be
explicit if we want to use python2.

[1] https://pygments.org/docs/changelog/
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/ipython/5.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/ipython/5.nix b/pkgs/development/python-modules/ipython/5.nix
index 15e7d00bcec..dd0c97fc3c5 100644
--- a/pkgs/development/python-modules/ipython/5.nix
+++ b/pkgs/development/python-modules/ipython/5.nix
@@ -2,6 +2,7 @@
 , stdenv
 , buildPythonPackage
 , fetchPypi
+, fetchpatch
 # Build dependencies
 , glibcLocales
 # Test dependencies
@@ -36,6 +37,15 @@ buildPythonPackage rec {
     substituteInPlace setup.py --replace "'gnureadline'" " "
   '';
 
+  patches = [
+    # Use the proper pygments lexer for python2 (https://github.com/ipython/ipython/pull/12095)
+    (fetchpatch {
+      name = "python2-lexer.patch";
+      url = "https://github.com/ipython/ipython/pull/12095/commits/8805293b5e4bce9150cc2ad9c5d6d984849ae447.patch";
+      sha256 = "16p4gl7a49v76w33j39ih7yspy6x2d14p9bh4wdpg9cafhw9nbc0";
+    })
+  ];
+
   buildInputs = [ glibcLocales ];
 
   checkInputs = [ nose pygments testpath ] ++ lib.optional isPy27 mock;