1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, fetchpatch 6# Build dependencies 7, glibcLocales 8# Test dependencies 9, nose 10, pygments 11, testpath 12, isPy27 13, mock 14# Runtime dependencies 15, backports_shutil_get_terminal_size 16, decorator 17, pathlib2 18, pickleshare 19, requests 20, simplegeneric 21, traitlets 22, prompt_toolkit 23, pexpect 24, appnope 25}: 26 27buildPythonPackage rec { 28 pname = "ipython"; 29 version = "5.7.0"; 30 31 src = fetchPypi { 32 inherit pname version; 33 sha256 = "0g1jm06qriq48m58311cs7askp83ipq3yq96hv4kg431nxzkmd4d"; 34 }; 35 36 prePatch = stdenv.lib.optionalString stdenv.isDarwin '' 37 substituteInPlace setup.py --replace "'gnureadline'" " " 38 ''; 39 40 patches = [ 41 # improve cython support, needed by sage, accepted upstream 42 # https://github.com/ipython/ipython/pull/11139 43 (fetchpatch { 44 name = "signature-use-inspect.patch"; 45 url = "https://github.com/ipython/ipython/commit/8d399b98d3ed5c765835594100c4d36fb2f739dc.patch"; 46 sha256 = "1r7v9clwwbskmj4y160vcj6g0vzqbvnj4y1bm2n4bskafapm42g0"; 47 }) 48 ]; 49 50 buildInputs = [ glibcLocales ]; 51 52 checkInputs = [ nose pygments testpath ] ++ lib.optional isPy27 mock; 53 54 propagatedBuildInputs = [ 55 backports_shutil_get_terminal_size decorator pickleshare prompt_toolkit 56 simplegeneric traitlets requests pathlib2 pexpect 57 ] ++ lib.optionals stdenv.isDarwin [ appnope ]; 58 59 LC_ALL="en_US.UTF-8"; 60 61 doCheck = false; # Circular dependency with ipykernel 62 63 checkPhase = '' 64 nosetests 65 ''; 66 67 meta = { 68 description = "IPython: Productive Interactive Computing"; 69 homepage = http://ipython.org/; 70 license = lib.licenses.bsd3; 71 maintainers = with lib.maintainers; [ bjornfor jgeerds orivej lnl7 ]; 72 }; 73}