2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-06-15 15:56:04 +00:00
|
|
|
, colorama
|
|
|
|
, libunwind
|
|
|
|
, pytz
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
version = "0.4.15";
|
|
|
|
pname = "vmprof";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "a2d872a40196404386d1e0d960e97b37c86c3f72a4f9d5a2b5f9ca1adaff5b62";
|
|
|
|
};
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
buildInputs = [ libunwind ];
|
|
|
|
propagatedBuildInputs = [ colorama requests six pytz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# No tests included
|
|
|
|
doCheck = false;
|
2020-06-15 15:56:04 +00:00
|
|
|
pythonImportsCheck = [ "vmprof" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains:
|
|
|
|
# ld: src/vmprof_unix.o:src/vmprof_common.h:92: multiple definition of
|
|
|
|
# `_PyThreadState_Current'; src/_vmprof.o:src/vmprof_common.h:92: first defined here
|
|
|
|
# TODO: can be removed once next release contains:
|
|
|
|
# https://github.com/vmprof/vmprof-python/pull/203
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A vmprof client";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://vmprof.readthedocs.org/";
|
|
|
|
};
|
|
|
|
}
|