diff --git a/pkgs/tools/misc/psrecord/default.nix b/pkgs/tools/misc/psrecord/default.nix new file mode 100644 index 00000000000..7df2b47497f --- /dev/null +++ b/pkgs/tools/misc/psrecord/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonApplication, fetchPypi, psutil, matplotlib, pytest }: +buildPythonApplication rec { + pname = "psrecord"; + version = "1.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "151rynca97v5wq1drl2yfrqmqil1km72cizn3159c2ip14626mp6"; + }; + + propagatedBuildInputs = [ + psutil matplotlib + ]; + + checkInputs = [ + pytest + ]; + + checkPhase = '' + runHook preCheck + pytest psrecord + runHook postCheck + ''; + + meta = { + description = "Record the CPU and memory activity of a process"; + homepage = "https://github.com/astrofrog/psrecord"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ johnazoidberg ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc858b9091c..71773a7ae60 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1786,6 +1786,8 @@ in inherit (darwin.apple_sdk.frameworks) Security; }; + psrecord = python3Packages.callPackage ../tools/misc/psrecord {}; + scour = with python3Packages; toPythonApplication scour; s2png = callPackage ../tools/graphics/s2png { };