1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 ipython,
6 pytestCheckHook,
7 pythonOlder,
8 requests,
9 setuptools,
10 tornado,
11}:
12
13buildPythonPackage rec {
14 pname = "snakeviz";
15 version = "2.2.2";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "jiffyclub";
22 repo = "snakeviz";
23 tag = "v${version}";
24 hash = "sha256-s/OATRnkooucRkLer5A66X9xDEA7aKNo+c10m1N7Guw=";
25 };
26
27 nativeBuildInputs = [ setuptools ];
28
29 propagatedBuildInputs = [ tornado ];
30
31 __darwinAllowLocalNetworking = true;
32
33 nativeCheckInputs = [
34 ipython
35 pytestCheckHook
36 requests
37 ];
38
39 pythonImportsCheck = [ "snakeviz" ];
40
41 preCheck = ''
42 export PATH="$PATH:$out/bin";
43 export HOME="$PWD/.home"
44 mkdir -p "$HOME"
45 '';
46
47 meta = with lib; {
48 description = "Browser based viewer for profiling data";
49 mainProgram = "snakeviz";
50 homepage = "https://jiffyclub.github.io/snakeviz";
51 changelog = "https://github.com/jiffyclub/snakeviz/blob/v${version}/CHANGES.rst";
52 license = licenses.bsd3;
53 maintainers = with maintainers; [
54 nixy
55 pbsds
56 ];
57 };
58}