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