diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2022-08-12 10:49:51 +0200 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2022-08-12 10:49:51 +0200 |
commit | b6a68f8f42c4a1b7878d12ca0d3c187a5c880260 (patch) | |
tree | ae146926578ede721572efdfb85fc1dd738a0f73 /pkgs/development/tools/memray | |
parent | 43965fdc371f8f2404ce67bdce929698d7b083ae (diff) |
memray: init at 1.2.0
Diffstat (limited to 'pkgs/development/tools/memray')
-rw-r--r-- | pkgs/development/tools/memray/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/development/tools/memray/default.nix b/pkgs/development/tools/memray/default.nix new file mode 100644 index 0000000000000..d352622d53b4d --- /dev/null +++ b/pkgs/development/tools/memray/default.nix @@ -0,0 +1,63 @@ +{ lib +, fetchFromGitHub +, libunwind +, lz4 +, pkg-config +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "memray"; + version = "1.2.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "bloomberg"; + repo = pname; + rev = "v${version}"; + hash = "sha256-MZOKo0VaCJM/YyvCByM5Yg7H/8onDKNSufBzr+GsFlo="; + }; + + buildInputs = [ + libunwind + lz4 + pkg-config + ] ++ (with python3.pkgs; [ + cython + ]); + + propagatedBuildInputs = with python3.pkgs; [ + jinja2 + rich + ]; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "memray" + ]; + + pytestFlagsArray = [ + "tests" + ]; + + disabledTests = [ + # Import issue + "test_header_allocator" + ]; + + disabledTestPaths = [ + # Very time-consuming and some tests fails (performance-related?) + "tests/integration/test_main.py" + ]; + + meta = with lib; { + description = "Memory profiler for Python"; + homepage = "https://bloomberg.github.io/memray/"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + platforms = platforms.linux; + }; +} |