Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, cython 5, isPyPy 6, ipython 7, python 8, scikit-build 9, cmake 10}: 11 12buildPythonPackage rec { 13 pname = "line_profiler"; 14 version = "3.0.2"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "7218ad6bd81f8649b211974bf108933910f016d66b49651effe7bbf63667d141"; 19 }; 20 21 nativeBuildInputs = [ 22 cython 23 cmake 24 scikit-build 25 ]; 26 27 dontUseCmakeConfigure = true; 28 29 propagatedBuildInputs = [ 30 ipython 31 ]; 32 33 disabled = isPyPy; 34 35 preBuild = '' 36 rm -f _line_profiler.c 37 ''; 38 39 checkInputs = [ 40 ipython 41 ]; 42 43 checkPhase = '' 44 PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s . 45 ''; 46 47 meta = { 48 description = "Line-by-line profiler"; 49 homepage = "https://github.com/rkern/line_profiler"; 50 license = lib.licenses.bsd3; 51 maintainers = with lib.maintainers; [ fridh ]; 52 }; 53}