2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonApplication
|
|
|
|
, fetchPypi
|
|
|
|
, gdb
|
|
|
|
, flask
|
2021-02-05 17:12:51 +00:00
|
|
|
, six
|
|
|
|
, bidict
|
|
|
|
, python-engineio
|
|
|
|
, python-socketio
|
2020-04-24 23:36:52 +00:00
|
|
|
, flask-socketio
|
|
|
|
, flask-compress
|
|
|
|
, pygdbmi
|
|
|
|
, pygments
|
|
|
|
, gevent
|
2020-08-20 17:08:02 +00:00
|
|
|
, gevent-websocket
|
|
|
|
, eventlet
|
2020-04-24 23:36:52 +00:00
|
|
|
, }:
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
let
|
|
|
|
# gdbgui only works with the latest previous major version of flask-socketio,
|
|
|
|
# which depends itself on the latest previous major versions of dependencies.
|
|
|
|
python-engineio' = python-engineio.overridePythonAttrs (old: rec {
|
|
|
|
version = "3.14.2";
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit (old) pname;
|
|
|
|
inherit version;
|
|
|
|
sha256 = "119halljynqsgswlhlh750qv56js1p7j52sc0nbwxh8450zmbd7a";
|
|
|
|
};
|
|
|
|
propagatedBuildInputs = [ six ];
|
|
|
|
doCheck = false;
|
|
|
|
});
|
|
|
|
python-socketio' = python-socketio.overridePythonAttrs (old: rec {
|
|
|
|
version = "4.6.1";
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit (old) pname;
|
|
|
|
inherit version;
|
|
|
|
sha256 = "047syhrrxh327p0fnab0d1zy25zijnj3gs1qg3kjpsy1jaj5l7yd";
|
|
|
|
};
|
|
|
|
propagatedBuildInputs = [ bidict python-engineio' ];
|
|
|
|
doCheck = false;
|
|
|
|
});
|
|
|
|
flask-socketio' = flask-socketio.overridePythonAttrs (old: rec {
|
|
|
|
version = "4.3.2";
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit (old) pname;
|
|
|
|
inherit version;
|
|
|
|
sha256 = "0s2xs9kv9cbwy8bcxszhdwlcb9ldv0fj33lwilf5vypj0wsin01p";
|
|
|
|
};
|
|
|
|
propagatedBuildInputs = [ flask python-socketio' ];
|
|
|
|
doCheck = false;
|
|
|
|
});
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "gdbgui";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "0.14.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ gdb ];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
flask
|
2021-02-05 17:12:51 +00:00
|
|
|
flask-socketio'
|
2020-04-24 23:36:52 +00:00
|
|
|
flask-compress
|
|
|
|
pygdbmi
|
|
|
|
pygments
|
|
|
|
gevent
|
2020-08-20 17:08:02 +00:00
|
|
|
gevent-websocket
|
|
|
|
eventlet
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "1v6wwsncgnhlg5c7gsmzcp52hfblfnz5kf5pk4d0zybflsxak02d";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
echo ${version} > gdbgui/VERSION.txt
|
|
|
|
# remove upper version bound
|
|
|
|
sed -ie 's!, <.*"!"!' setup.py
|
2021-02-05 17:12:51 +00:00
|
|
|
sed -i 's/greenlet==/greenlet>=/' setup.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/gdbgui \
|
2021-02-05 17:12:51 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ gdb ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# tests do not work without stdout/stdin
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A browser-based frontend for GDB";
|
2020-08-20 17:08:02 +00:00
|
|
|
homepage = "https://www.gdbgui.com/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.unix;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with maintainers; [ yrashk dump_stack ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|