From 4b2e7c40c4911ea5cdee901c74f7937dec93f0f4 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 27 Jun 2019 20:23:17 +0200 Subject: [PATCH] psrecord: init at 1.1 --- pkgs/tools/misc/psrecord/default.nix | 31 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/tools/misc/psrecord/default.nix diff --git a/pkgs/tools/misc/psrecord/default.nix b/pkgs/tools/misc/psrecord/default.nix new file mode 100644 index 000000000000..7df2b47497f0 --- /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 50ff45cd0b51..41bcd400e0fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1784,6 +1784,8 @@ in inherit (darwin.apple_sdk.frameworks) Security; }; + psrecord = python3Packages.callPackage ../tools/misc/psrecord {}; + scour = with python3Packages; toPythonApplication scour; s2png = callPackage ../tools/graphics/s2png { };