2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
curtsies,
|
|
|
|
cwcwidth,
|
|
|
|
greenlet,
|
|
|
|
jedi,
|
|
|
|
pygments,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pyperclip,
|
|
|
|
pyxdg,
|
|
|
|
requests,
|
|
|
|
substituteAll,
|
|
|
|
typing-extensions,
|
|
|
|
urwid,
|
|
|
|
watchdog,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bpython";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.24";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-mHNv/XqMSP0r+1PYmKR19CQb3gtnISVwavBNnQj9Pb0=";
|
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"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "bpython" ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Check for syntax error ends with an AssertionError
|
|
|
|
"test_syntaxerror"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Fancy curses interface to the Python interactive interpreter";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://bpython-interpreter.org/";
|
|
|
|
license = licenses.mit;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
flokli
|
|
|
|
dotlambda
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|