1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, pythonOlder
6# Build dependencies
7, glibcLocales
8# Test dependencies
9, nose
10, pygments
11# Runtime dependencies
12, jedi
13, decorator
14, pickleshare
15, traitlets
16, prompt_toolkit
17, pexpect
18, appnope
19, backcall
20}:
21
22buildPythonPackage rec {
23 pname = "ipython";
24 version = "7.2.0";
25 disabled = pythonOlder "3.5";
26
27 src = fetchPypi {
28 inherit pname version;
29 sha256 = "6a9496209b76463f1dec126ab928919aaf1f55b38beb9219af3fe202f6bbdd12";
30 };
31
32 prePatch = lib.optionalString stdenv.isDarwin ''
33 substituteInPlace setup.py --replace "'gnureadline'" " "
34 '';
35
36 buildInputs = [ glibcLocales ];
37
38 checkInputs = [ nose pygments ];
39
40 propagatedBuildInputs = [
41 jedi
42 decorator
43 pickleshare
44 traitlets
45 prompt_toolkit
46 pygments
47 pexpect
48 backcall
49 ] ++ lib.optionals stdenv.isDarwin [appnope];
50
51 LC_ALL="en_US.UTF-8";
52
53 doCheck = false; # Circular dependency with ipykernel
54
55 checkPhase = ''
56 nosetests
57 '';
58
59 meta = {
60 description = "IPython: Productive Interactive Computing";
61 homepage = http://ipython.org/;
62 license = lib.licenses.bsd3;
63 maintainers = with lib.maintainers; [ bjornfor jgeerds fridh ];
64 };
65}