1{ stdenv, buildPythonPackage, fetchPypi, pygments, greenlet, curtsies, urwid, requests, mock }:
2
3buildPythonPackage rec {
4 pname = "bpython";
5 version = "0.17.1";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "8907c510bca3c4d9bc0a157279bdc5e3b739cc68c0f247167279b6fe4becb02f";
10 };
11
12 propagatedBuildInputs = [ curtsies greenlet pygments requests urwid ];
13
14 postInstall = ''
15 substituteInPlace "$out/share/applications/bpython.desktop" \
16 --replace "Exec=/usr/bin/bpython" "Exec=$out/bin/bpython"
17 '';
18
19 checkInputs = [ mock ];
20
21 # tests fail: https://github.com/bpython/bpython/issues/712
22 doCheck = false;
23
24 meta = with stdenv.lib; {
25 description = "A fancy curses interface to the Python interactive interpreter";
26 homepage = "https://bpython-interpreter.org/";
27 license = licenses.mit;
28 maintainers = with maintainers; [ flokli ];
29 };
30}