2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2021-01-05 17:05:55 +00:00
|
|
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation (rec {
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "4.12.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libpfm";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/perfmon2/libpfm4/${pname}-${version}.tar.gz";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-SwwfU/OaYVJbab6/UyxoBAwbmE11RKiuCESxPNkeHuQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"LDCONFIG=true"
|
|
|
|
"ARCH=${stdenv.hostPlatform.uname.processor}"
|
|
|
|
"SYS=${stdenv.hostPlatform.uname.system}"
|
|
|
|
];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Helper library to program the performance monitoring events";
|
|
|
|
longDescription = ''
|
|
|
|
This package provides a library, called libpfm4 which is used to
|
|
|
|
develop monitoring tools exploiting the performance monitoring
|
|
|
|
events such as those provided by the Performance Monitoring Unit
|
|
|
|
(PMU) of modern processors.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.pierron ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2021-02-05 17:12:51 +00:00
|
|
|
} // lib.optionalAttrs ( ! enableShared )
|
2020-04-24 23:36:52 +00:00
|
|
|
{
|
|
|
|
CONFIG_PFMLIB_SHARED = "n";
|
|
|
|
}
|
|
|
|
)
|