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
|
2022-04-27 09:35:20 +00:00
|
|
|
, dataclasses
|
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";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "0.23";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-nwB4q8iHxIrwiGkeL2R5fWyplKwPS8A8ONBvZX18BSo=";
|
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
|
2022-04-27 09:35:20 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
dataclasses
|
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
|
|
|
};
|
|
|
|
}
|