2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2022-10-30 15:09:59 +00:00
|
|
|
, buildPythonPackage
|
2021-12-06 16:07:01 +00:00
|
|
|
, python
|
|
|
|
, graphviz
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildPythonPackage rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "gprof2dot";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "2021.02.21";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jrfonseca";
|
|
|
|
repo = "gprof2dot";
|
2021-07-21 07:28:18 +00:00
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "1jjhsjf5fdi1fkn7mvhnzkh6cynl8gcjrygd3cya5mmda3akhzic";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix PATH : ${lib.makeBinPath [ graphviz ]}"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Needed so dot is on path of the test script
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [ graphviz ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
# if options not specified, will use unwrapped gprof2dot from original source
|
|
|
|
${python.interpreter} tests/test.py --python bash --gprof2dot $out/bin/gprof2dot
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/jrfonseca/gprof2dot";
|
|
|
|
description = "Python script to convert the output from many profilers into a dot graph";
|
|
|
|
license = licenses.lgpl3Plus;
|
2022-10-30 15:09:59 +00:00
|
|
|
maintainers = with maintainers; [ pmiddend ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|