about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/bpython/default.nix
blob: 3285f3dee9736a643bf6f7b4f2da7b11ed8b1d41 (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
57
58
59
{ lib
, buildPythonPackage
, fetchPypi
, curtsies
, cwcwidth
, greenlet
, jedi
, pygments
, pytestCheckHook
, pyperclip
, pyxdg
, requests
, substituteAll
, typing-extensions
, urwid
, watchdog
}:

buildPythonPackage rec {
  pname = "bpython";
  version = "0.22.1";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1fb1e0a52332579fc4e3dcf75e21796af67aae2be460179ecfcce9530a49a200";
  };

  propagatedBuildInputs = [
    curtsies
    cwcwidth
    greenlet
    jedi
    pygments
    pyperclip
    pyxdg
    requests
    typing-extensions
    urwid
    watchdog
  ];

  postInstall = ''
    substituteInPlace "$out/share/applications/org.bpython-interpreter.bpython.desktop" \
      --replace "Exec=/usr/bin/bpython" "Exec=$out/bin/bpython"
  '';

  checkInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [ "bpython" ];

  meta = with lib; {
    description = "A fancy curses interface to the Python interactive interpreter";
    homepage = "https://bpython-interpreter.org/";
    license = licenses.mit;
    maintainers = with maintainers; [ flokli dotlambda ];
  };
}