Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, fetchFromGitHub 3, libunwind 4, lz4 5, pkg-config 6, python3 7}: 8 9python3.pkgs.buildPythonApplication rec { 10 pname = "memray"; 11 version = "1.7.0"; 12 format = "setuptools"; 13 14 src = fetchFromGitHub { 15 owner = "bloomberg"; 16 repo = pname; 17 rev = "refs/tags/v${version}"; 18 hash = "sha256-FM6DVBnYgvciTeF9bf2NDvHGsnccxKqcR5ATj6daQ4w="; 19 }; 20 21 nativeBuildInputs = [ 22 pkg-config 23 ]; 24 25 buildInputs = [ 26 libunwind 27 lz4 28 ] ++ (with python3.pkgs; [ 29 cython 30 ]); 31 32 propagatedBuildInputs = with python3.pkgs; [ 33 jinja2 34 rich 35 ]; 36 37 nativeCheckInputs = with python3.pkgs; [ 38 ipython 39 pytestCheckHook 40 ] ++ lib.optionals (pythonOlder "3.11") [ 41 greenlet 42 ]; 43 44 pythonImportsCheck = [ 45 "memray" 46 ]; 47 48 pytestFlagsArray = [ 49 "tests" 50 ]; 51 52 disabledTests = [ 53 # Import issue 54 "test_header_allocator" 55 "test_hybrid_stack_of_allocations_inside_ceval" 56 ]; 57 58 disabledTestPaths = [ 59 # Very time-consuming and some tests fails (performance-related?) 60 "tests/integration/test_main.py" 61 ]; 62 63 meta = with lib; { 64 description = "Memory profiler for Python"; 65 homepage = "https://bloomberg.github.io/memray/"; 66 license = licenses.asl20; 67 maintainers = with maintainers; [ fab ]; 68 platforms = platforms.linux; 69 changelog = "https://github.com/bloomberg/memray/releases/tag/v${version}"; 70 }; 71}