Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 63 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 cython, 6 isPyPy, 7 ipython, 8 scikit-build, 9 cmake, 10 pythonOlder, 11 pytestCheckHook, 12 ubelt, 13}: 14 15buildPythonPackage rec { 16 pname = "line-profiler"; 17 version = "4.2.0"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.8" || isPyPy; 21 22 src = fetchPypi { 23 pname = "line_profiler"; 24 inherit version; 25 hash = "sha256-CeEPJfh2UUOAs/rubek/sMIoq7qFgguhpZHds+tFGpY="; 26 }; 27 28 nativeBuildInputs = [ 29 cython 30 cmake 31 scikit-build 32 ]; 33 34 optional-dependencies = { 35 ipython = [ ipython ]; 36 }; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 ubelt 41 ] ++ optional-dependencies.ipython; 42 43 dontUseCmakeConfigure = true; 44 45 preBuild = '' 46 rm -f _line_profiler.c 47 ''; 48 49 preCheck = '' 50 rm -r line_profiler 51 export PATH=$out/bin:$PATH 52 ''; 53 54 pythonImportsCheck = [ "line_profiler" ]; 55 56 meta = with lib; { 57 description = "Line-by-line profiler"; 58 mainProgram = "kernprof"; 59 homepage = "https://github.com/pyutils/line_profiler"; 60 changelog = "https://github.com/pyutils/line_profiler/blob/v${version}/CHANGELOG.rst"; 61 license = licenses.bsd3; 62 }; 63}