nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 gevent,
6 python,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "yappi";
12 version = "1.7.3";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "sumerc";
17 repo = "yappi";
18 tag = version;
19 hash = "sha256-YbWPx5Wf1s1UCCiDCInw66VnZ005LfON81MN3phT+fU=";
20 };
21
22 patches = [ ./tests.patch ];
23
24 build-system = [ setuptools ];
25
26 nativeCheckInputs = [ gevent ];
27
28 checkPhase = ''
29 runHook preCheck
30 ${python.interpreter} run_tests.py
31 runHook postCheck
32 '';
33
34 pythonImportsCheck = [ "yappi" ];
35
36 meta = {
37 description = "Python profiler that supports multithreading and measuring CPU time";
38 mainProgram = "yappi";
39 homepage = "https://github.com/sumerc/yappi";
40 license = lib.licenses.mit;
41 maintainers = [ ];
42 };
43}