2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-06-18 07:06:33 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, curtsies
|
2021-12-26 17:43:05 +00:00
|
|
|
, cwcwidth
|
2020-06-18 07:06:33 +00:00
|
|
|
, greenlet
|
2021-05-20 23:08:51 +00:00
|
|
|
, jedi
|
2020-06-18 07:06:33 +00:00
|
|
|
, pygments
|
2021-12-26 17:43:05 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pyperclip
|
2021-05-20 23:08:51 +00:00
|
|
|
, pyxdg
|
2020-06-18 07:06:33 +00:00
|
|
|
, requests
|
|
|
|
, substituteAll
|
2021-12-26 17:43:05 +00:00
|
|
|
, typing-extensions
|
2020-06-18 07:06:33 +00:00
|
|
|
, urwid
|
2021-05-20 23:08:51 +00:00
|
|
|
, watchdog
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bpython";
|
2021-12-26 17:43:05 +00:00
|
|
|
version = "0.22.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-26 17:43:05 +00:00
|
|
|
sha256 = "1fb1e0a52332579fc4e3dcf75e21796af67aae2be460179ecfcce9530a49a200";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
curtsies
|
2021-12-26 17:43:05 +00:00
|
|
|
cwcwidth
|
2021-05-20 23:08:51 +00:00
|
|
|
greenlet
|
2021-12-26 17:43:05 +00:00
|
|
|
jedi
|
2021-05-20 23:08:51 +00:00
|
|
|
pygments
|
2021-12-26 17:43:05 +00:00
|
|
|
pyperclip
|
2021-05-20 23:08:51 +00:00
|
|
|
pyxdg
|
|
|
|
requests
|
2021-12-26 17:43:05 +00:00
|
|
|
typing-extensions
|
2021-05-20 23:08:51 +00:00
|
|
|
urwid
|
2021-12-26 17:43:05 +00:00
|
|
|
watchdog
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace "$out/share/applications/org.bpython-interpreter.bpython.desktop" \
|
|
|
|
--replace "Exec=/usr/bin/bpython" "Exec=$out/bin/bpython"
|
|
|
|
'';
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonImportsCheck = [ "bpython" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A fancy curses interface to the Python interactive interpreter";
|
|
|
|
homepage = "https://bpython-interpreter.org/";
|
|
|
|
license = licenses.mit;
|
2021-12-26 17:43:05 +00:00
|
|
|
maintainers = with maintainers; [ flokli dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|