Files
nixpkgs/pkgs/by-name/me/memray/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

86 lines
1.8 KiB
Nix

{
lib,
elfutils,
fetchFromGitHub,
libunwind,
lz4,
pkg-config,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "memray";
version = "1.19.0";
pyproject = true;
src = fetchFromGitHub {
owner = "bloomberg";
repo = "memray";
tag = "v${version}";
hash = "sha256-yOiN4KES+zCHp/n0pN73Yv6ibEtUGy1pqiH/3WECqkA=";
};
build-system = with python3Packages; [
distutils
setuptools
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
elfutils # for `-ldebuginfod`
libunwind
lz4
]
++ (with python3Packages; [ cython ]);
dependencies = with python3Packages; [
pkgconfig
textual
jinja2
rich
];
nativeCheckInputs =
with python3Packages;
[
ipython
pytest-cov-stub # fix Unknown pytest.mark.no_cover
pytest-textual-snapshot
pytestCheckHook
]
++ lib.optionals (pythonOlder "3.14") [ greenlet ];
pythonImportsCheck = [ "memray" ];
enabledTestPaths = [ "tests" ];
disabledTests = [
# Import issue
"test_header_allocator"
"test_hybrid_stack_of_allocations_inside_ceval"
# The following snapshot tests started failing since updating textual to 3.5.0
"TestTUILooks"
"test_merge_threads"
"test_tui_basic"
"test_tui_gradient"
"test_tui_pause"
"test_unmerge_threads"
];
disabledTestPaths = [
# Very time-consuming and some tests fails (performance-related?)
"tests/integration/test_main.py"
];
meta = {
description = "Memory profiler for Python";
homepage = "https://bloomberg.github.io/memray/";
changelog = "https://github.com/bloomberg/memray/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
platforms = lib.platforms.linux;
};
}