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
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonOlder
|
2021-12-26 17:43:05 +00:00
|
|
|
, 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";
|
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"
|
|
|
|
'';
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"bpython"
|
|
|
|
];
|
|
|
|
|
|
|
|
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; {
|
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
|
|
|
};
|
|
|
|
}
|