From bad7bebae4633262b9bf2feea245c7d481cb294c Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Wed, 27 Oct 2021 16:16:02 -0400 Subject: [PATCH] python3Packages.gprof2dot: 201.11.30 -> 2021.02.21 Also add graphviz as runtime dependency, and change tests to test script in $out --- .../python-modules/gprof2dot/default.nix | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/gprof2dot/default.nix b/pkgs/development/python-modules/gprof2dot/default.nix index 3170d199cf55..4eb3a79e5e87 100644 --- a/pkgs/development/python-modules/gprof2dot/default.nix +++ b/pkgs/development/python-modules/gprof2dot/default.nix @@ -1,18 +1,36 @@ -{ lib, fetchFromGitHub, buildPythonApplication, python, graphviz }: +{ lib +, fetchFromGitHub +, buildPythonApplication +, python +, graphviz +}: buildPythonApplication rec { pname = "gprof2dot"; - version = "2019.11.30"; + version = "2021.02.21"; src = fetchFromGitHub { owner = "jrfonseca"; repo = "gprof2dot"; rev = version; - sha256 = "1nw4cfwimd0djarw4wc756q095xir78js8flmycg6g7sl3l6p27s"; + sha256 = "1jjhsjf5fdi1fkn7mvhnzkh6cynl8gcjrygd3cya5mmda3akhzic"; }; + makeWrapperArgs = [ + "--prefix PATH : ${lib.makeBinPath [ graphviz ]}" + ]; + + # Needed so dot is on path of the test script checkInputs = [ graphviz ]; - checkPhase = "${python.interpreter} tests/test.py"; + + 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";