2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2020-12-20 06:11:26 +00:00
|
|
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
2014-05-25 23:25:28 +00:00
|
|
|
|
2019-09-26 08:31:21 +00:00
|
|
|
stdenv.mkDerivation (rec {
|
2020-09-03 09:58:41 +00:00
|
|
|
version = "4.11.0";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libpfm";
|
2014-05-25 23:25:28 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "mirror://sourceforge/perfmon2/libpfm4/${pname}-${version}.tar.gz";
|
2020-09-03 09:58:41 +00:00
|
|
|
sha256 = "1k7yp6xfsglp2b6271r622sjinlbys0dk24n9iiv656y5f3zi9ax";
|
2014-05-25 23:25:28 +00:00
|
|
|
};
|
|
|
|
|
2018-11-20 21:44:23 +00:00
|
|
|
makeFlags = [
|
2018-12-13 18:58:01 +00:00
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"LDCONFIG=true"
|
2019-01-31 18:50:53 +00:00
|
|
|
"ARCH=${stdenv.hostPlatform.uname.processor}"
|
|
|
|
"SYS=${stdenv.hostPlatform.uname.system}"
|
2018-11-20 21:44:23 +00:00
|
|
|
];
|
|
|
|
|
2019-10-29 23:53:51 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error";
|
2018-09-24 15:42:57 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2014-05-25 23:25:28 +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.
|
|
|
|
'';
|
2015-05-30 13:14:10 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.pierron ];
|
2018-06-19 16:55:23 +00:00
|
|
|
platforms = platforms.linux;
|
2014-05-25 23:25:28 +00:00
|
|
|
};
|
2021-01-21 17:00:13 +00:00
|
|
|
} // lib.optionalAttrs ( ! enableShared )
|
2019-09-26 08:31:21 +00:00
|
|
|
{
|
|
|
|
CONFIG_PFMLIB_SHARED = "n";
|
2015-05-30 13:14:10 +00:00
|
|
|
}
|
2019-09-26 08:31:21 +00:00
|
|
|
)
|