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