Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl 2, enableShared ? !stdenv.hostPlatform.isStatic 3}: 4 5stdenv.mkDerivation (rec { 6 version = "4.12.0"; 7 pname = "libpfm"; 8 9 src = fetchurl { 10 url = "mirror://sourceforge/perfmon2/libpfm4/${pname}-${version}.tar.gz"; 11 sha256 = "sha256-SwwfU/OaYVJbab6/UyxoBAwbmE11RKiuCESxPNkeHuQ="; 12 }; 13 14 makeFlags = [ 15 "PREFIX=${placeholder "out"}" 16 "LDCONFIG=true" 17 "ARCH=${stdenv.hostPlatform.uname.processor}" 18 "SYS=${stdenv.hostPlatform.uname.system}" 19 ]; 20 21 env.NIX_CFLAGS_COMPILE = "-Wno-error"; 22 23 meta = with lib; { 24 description = "Helper library to program the performance monitoring events"; 25 longDescription = '' 26 This package provides a library, called libpfm4 which is used to 27 develop monitoring tools exploiting the performance monitoring 28 events such as those provided by the Performance Monitoring Unit 29 (PMU) of modern processors. 30 ''; 31 license = licenses.gpl2; 32 maintainers = [ maintainers.pierron ]; 33 platforms = platforms.linux; 34 }; 35} // lib.optionalAttrs ( ! enableShared ) 36{ 37 CONFIG_PFMLIB_SHARED = "n"; 38} 39)