mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
43 lines
1005 B
Nix
43 lines
1005 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildPythonPackage
|
|
, python
|
|
, graphviz
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "gprof2dot";
|
|
version = "2021.02.21";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jrfonseca";
|
|
repo = "gprof2dot";
|
|
rev = version;
|
|
sha256 = "1jjhsjf5fdi1fkn7mvhnzkh6cynl8gcjrygd3cya5mmda3akhzic";
|
|
};
|
|
|
|
makeWrapperArgs = [
|
|
"--prefix PATH : ${lib.makeBinPath [ graphviz ]}"
|
|
];
|
|
|
|
# Needed so dot is on path of the test script
|
|
nativeCheckInputs = [ graphviz ];
|
|
|
|
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
|
|
'';
|
|
|
|
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;
|
|
maintainers = with maintainers; [ pmiddend ];
|
|
};
|
|
}
|