nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 85 lines 1.8 kB view raw
1{ 2 lib, 3 elfutils, 4 fetchFromGitHub, 5 libunwind, 6 lz4, 7 pkg-config, 8 python3Packages, 9}: 10 11python3Packages.buildPythonApplication rec { 12 pname = "memray"; 13 version = "1.17.2"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "bloomberg"; 18 repo = "memray"; 19 tag = "v${version}"; 20 hash = "sha256-n000m2jIJJFZFTjfECS3gFrO6xHauZW46xe1tDqI6Lg="; 21 }; 22 23 build-system = with python3Packages; [ 24 distutils 25 setuptools 26 ]; 27 28 nativeBuildInputs = [ pkg-config ]; 29 30 buildInputs = [ 31 elfutils # for `-ldebuginfod` 32 libunwind 33 lz4 34 ] 35 ++ (with python3Packages; [ cython ]); 36 37 dependencies = with python3Packages; [ 38 pkgconfig 39 textual 40 jinja2 41 rich 42 ]; 43 44 nativeCheckInputs = 45 with python3Packages; 46 [ 47 ipython 48 pytest-cov-stub # fix Unknown pytest.mark.no_cover 49 pytest-textual-snapshot 50 pytestCheckHook 51 ] 52 ++ lib.optionals (pythonOlder "3.14") [ greenlet ]; 53 54 pythonImportsCheck = [ "memray" ]; 55 56 enabledTestPaths = [ "tests" ]; 57 58 disabledTests = [ 59 # Import issue 60 "test_header_allocator" 61 "test_hybrid_stack_of_allocations_inside_ceval" 62 63 # The following snapshot tests started failing since updating textual to 3.5.0 64 "TestTUILooks" 65 "test_merge_threads" 66 "test_tui_basic" 67 "test_tui_gradient" 68 "test_tui_pause" 69 "test_unmerge_threads" 70 ]; 71 72 disabledTestPaths = [ 73 # Very time-consuming and some tests fails (performance-related?) 74 "tests/integration/test_main.py" 75 ]; 76 77 meta = { 78 description = "Memory profiler for Python"; 79 homepage = "https://bloomberg.github.io/memray/"; 80 changelog = "https://github.com/bloomberg/memray/releases/tag/v${src.tag}"; 81 license = lib.licenses.asl20; 82 maintainers = with lib.maintainers; [ fab ]; 83 platforms = lib.platforms.linux; 84 }; 85}