1{ lib, buildPythonPackage, fetchFromGitHub, gevent, isPy27, python }:
2
3buildPythonPackage rec {
4 pname = "yappi";
5 version = "1.3.0";
6 disabled = isPy27; # invalid syntax
7
8 src = fetchFromGitHub {
9 owner = "sumerc";
10 repo = pname;
11 rev = "30f94024a0e2e4fa21c220de6a0dc97b4cb2c319";
12 sha256 = "1kvwl3y3c2hivf9y2x1q1s8a2y724iwqd1krq6ryvsbg3inyh8qw";
13 };
14
15 patches = [ ./tests.patch ];
16 checkInputs = [ gevent ];
17 checkPhase = ''
18 ${python.interpreter} run_tests.py
19 '';
20
21 meta = with lib; {
22 homepage = "https://github.com/sumerc/yappi";
23 description = "Python profiler that supports multithreading and measuring CPU time";
24 license = licenses.mit;
25 maintainers = with maintainers; [ orivej ];
26 };
27}