1{ lib, buildPythonApplication, fetchPypi, psutil, matplotlib, pytest }:
2buildPythonApplication rec {
3 pname = "psrecord";
4 version = "1.2";
5
6 src = fetchPypi {
7 inherit pname version;
8 sha256 = "5d48410e543b71e5dc4677705acc2a753db65814d3ccbdfbca8d5d3a09b053b1";
9 };
10
11 propagatedBuildInputs = [
12 psutil matplotlib
13 ];
14
15 nativeCheckInputs = [
16 pytest
17 ];
18
19 checkPhase = ''
20 runHook preCheck
21 pytest psrecord
22 runHook postCheck
23 '';
24
25 meta = {
26 description = "Record the CPU and memory activity of a process";
27 homepage = "https://github.com/astrofrog/psrecord";
28 license = lib.licenses.bsd2;
29 maintainers = with lib.maintainers; [ johnazoidberg ];
30 };
31}