at 17.09-beta 44 lines 1.7 kB view raw
1{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxHeaders 2, libiberty_static, withGUI ? false , qt4 ? null}: 3 4# libX11 is needed because the Qt build stuff automatically adds `-lX11'. 5assert withGUI -> qt4 != null; 6 7stdenv.mkDerivation rec { 8 name = "oprofile-1.1.0"; 9 10 src = fetchurl { 11 url = "mirror://sourceforge/oprofile/${name}.tar.gz"; 12 sha256 = "0v1nn38h227bgxjwqf22rjp2iqgjm4ls3gckzifks0x6w5nrlxfg"; 13 }; 14 15 buildInputs = [ binutils zlib popt pkgconfig linuxHeaders libiberty_static ] 16 ++ stdenv.lib.optionals withGUI [ qt4 ]; 17 18 configureFlags = [ 19 "--with-kernel=${linuxHeaders}" 20 "--disable-shared" # needed because only the static libbfd is available 21 ] 22 ++ stdenv.lib.optional withGUI "--with-qt-dir=${qt4} --enable-gui=qt4"; 23 24 meta = { 25 description = "System-wide profiler for Linux"; 26 longDescription = '' 27 OProfile is a system-wide profiler for Linux systems, capable of 28 profiling all running code at low overhead. It consists of a 29 kernel driver and a daemon for collecting sample data, and 30 several post-profiling tools for turning data into information. 31 32 OProfile leverages the hardware performance counters of the CPU 33 to enable profiling of a wide variety of interesting statistics, 34 which can also be used for basic time-spent profiling. All code 35 is profiled: hardware and software interrupt handlers, kernel 36 modules, the kernel, shared libraries, and applications. 37 ''; 38 license = stdenv.lib.licenses.gpl2; 39 homepage = http://oprofile.sourceforge.net/; 40 41 platforms = stdenv.lib.platforms.linux; 42 maintainers = [ ]; 43 }; 44}