1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 decorator,
7 ipython,
8 isPyPy,
9 exceptiongroup,
10 tomli,
11 setuptools,
12 unittestCheckHook,
13}:
14
15buildPythonPackage rec {
16 pname = "ipdb";
17 version = "0.13.13";
18 format = "pyproject";
19
20 disabled = isPyPy; # setupterm: could not find terminfo database
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-46xgGO8FEm1EKvaAqthjAG7BnQIpBWGsiLixwLDPxyY=";
25 };
26
27 nativeBuildInputs = [ setuptools ];
28
29 propagatedBuildInputs =
30 [
31 ipython
32 decorator
33 ]
34 ++ lib.optionals (pythonOlder "3.11") [
35 exceptiongroup
36 tomli
37 ];
38
39 nativeCheckInputs = [ unittestCheckHook ];
40
41 preCheck = ''
42 export HOME=$(mktemp -d)
43 '';
44
45 meta = with lib; {
46 homepage = "https://github.com/gotcha/ipdb";
47 description = "IPython-enabled pdb";
48 mainProgram = "ipdb3";
49 license = licenses.bsd0;
50 maintainers = [ ];
51 };
52}