summary refs log tree commit diff
path: root/pkgs/shells/ipython/default.nix
blob: 09b2d30ea7cacdce5a765c65c0912aed43b8e484 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ stdenv, fetchurl, buildPythonPackage, pythonPackages, pyqt4 ? null
, notebookSupport ? true   # ipython notebook
, qtconsoleSupport ? true  # ipython qtconsole
, pylabSupport ? true      # ipython --pylab    (backend: agg - no gui, just file)
, pylabQtSupport ? true    # ipython --pylab=qt (backend: Qt4Agg - plot to window)
}:

# ipython qtconsole works with both pyside and pyqt4. But ipython --pylab=qt
# only works with pyqt4 (at least this is true for ipython 0.13.1). So just use
# pyqt4 for both.

assert qtconsoleSupport == true -> pyqt4 != null;
assert pylabQtSupport == true -> pyqt4 != null;

buildPythonPackage rec {
  name = "ipython-2.3.1";
  namePrefix = "";

  src = fetchurl {
    url = "http://pypi.python.org/packages/source/i/ipython/${name}.tar.gz";
    sha256 = "1764gi5m3ff481rjk336cw6i2h4zlc0nxam9rc5m8m7yl9m4d61y";
  };

  propagatedBuildInputs = [
    pythonPackages.readline
    pythonPackages.sqlite3  # required for history support
  ] ++ stdenv.lib.optionals notebookSupport [
    pythonPackages.tornado
    pythonPackages.pyzmq
    pythonPackages.jinja2
  ] ++ stdenv.lib.optionals qtconsoleSupport [
    pythonPackages.pygments
    pythonPackages.pyzmq
    pyqt4
  ] ++ stdenv.lib.optionals pylabSupport [
    pythonPackages.matplotlib
  ] ++ stdenv.lib.optionals pylabQtSupport [
    pythonPackages.matplotlib
    pyqt4
  ];

  doCheck = false;

  meta = {
    homepage = http://ipython.scipy.org/;
    description = "An interactive computing environment for Python";
    license = stdenv.lib.licenses.bsd3;
    longDescription = ''
      The goal of IPython is to create a comprehensive environment
      for interactive and exploratory computing. It consists of an
      enhanced interactive Python shell and an architecture for
      interactive parallel computing.
    '';
    maintainers = [ stdenv.lib.maintainers.bjornfor ];
  };
}