1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, ipython
5, pytestCheckHook
6, pythonOlder
7, requests
8, setuptools
9, tornado
10}:
11
12buildPythonPackage rec {
13 pname = "snakeviz";
14 version = "2.2.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "jiffyclub";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-tW1zUfCgOGQ8TjrKo2lBzGb0MSe25dP0/P9Q6x3736E=";
24 };
25
26 nativeBuildInputs = [
27 setuptools
28 ];
29
30 propagatedBuildInputs = [
31 tornado
32 ];
33
34 nativeCheckInputs = [
35 ipython
36 pytestCheckHook
37 requests
38 ];
39
40 pythonImportsCheck = [
41 "snakeviz"
42 ];
43
44 preCheck = ''
45 export PATH="$PATH:$out/bin";
46 '';
47
48 meta = with lib; {
49 description = "Browser based viewer for profiling data";
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; [ nixy ];
54 };
55}