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 __darwinAllowLocalNetworking = true;
35
36 nativeCheckInputs = [
37 ipython
38 pytestCheckHook
39 requests
40 ];
41
42 pythonImportsCheck = [
43 "snakeviz"
44 ];
45
46 preCheck = ''
47 export PATH="$PATH:$out/bin";
48 '';
49
50 meta = with lib; {
51 description = "Browser based viewer for profiling data";
52 homepage = "https://jiffyclub.github.io/snakeviz";
53 changelog = "https://github.com/jiffyclub/snakeviz/blob/v${version}/CHANGES.rst";
54 license = licenses.bsd3;
55 maintainers = with maintainers; [ nixy ];
56 };
57}