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, matplotlib-inline
15, pickleshare
16, traitlets
17, prompt-toolkit
18, pexpect
19, appnope
20, backcall
21}:
22
23buildPythonPackage rec {
24 pname = "ipython";
25 version = "7.28.0";
26 disabled = pythonOlder "3.7";
27
28 src = fetchPypi {
29 inherit pname version;
30 sha256 = "2097be5c814d1b974aea57673176a924c4c8c9583890e7a5f082f547b9975b11";
31 };
32
33 prePatch = lib.optionalString stdenv.isDarwin ''
34 substituteInPlace setup.py --replace "'gnureadline'" " "
35 '';
36
37 buildInputs = [ glibcLocales ];
38
39 checkInputs = [ nose pygments ];
40
41 propagatedBuildInputs = [
42 jedi
43 decorator
44 matplotlib-inline
45 pickleshare
46 traitlets
47 prompt-toolkit
48 pygments
49 pexpect
50 backcall
51 ] ++ lib.optionals stdenv.isDarwin [appnope];
52
53 LC_ALL="en_US.UTF-8";
54
55 doCheck = false; # Circular dependency with ipykernel
56
57 checkPhase = ''
58 nosetests
59 '';
60
61 pythonImportsCheck = [
62 "IPython"
63 ];
64
65 meta = with lib; {
66 description = "IPython: Productive Interactive Computing";
67 homepage = "http://ipython.org/";
68 license = licenses.bsd3;
69 maintainers = with maintainers; [ bjornfor fridh ];
70 };
71}