1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/profiling/oprofile/default.nix
Bjørn Forsman c9baba9212 Fix many package descriptions
(My OCD kicked in today...)

Remove repeated package names, capitalize first word, remove trailing
periods and move overlong descriptions to longDescription.

I also simplified some descriptions as well, when they were particularly
long or technical, often based on Arch Linux' package descriptions.

I've tried to stay away from generated expressions (and I think I
succeeded).

Some specifics worth mentioning:
 * cron, has "Vixie Cron" in its description. The "Vixie" part is not
   mentioned anywhere else. I kept it in a parenthesis at the end of the
   description.

 * ctags description started with "Exuberant Ctags ...", and the
   "exuberant" part is not mentioned elsewhere. Kept it in a parenthesis
   at the end of description.

 * nix has the description "The Nix Deployment System". Since that
   doesn't really say much what it is/does (especially after removing
   the package name!), I changed that to "Powerful package manager that
   makes package management reliable and reproducible" (borrowed from
   nixos.org).

 * Tons of "GNU Foo, Foo is a [the important bits]" descriptions
   is changed to just [the important bits]. If the package name doesn't
   contain GNU I don't think it's needed to say it in the description
   either.
2014-08-24 22:31:37 +02:00

57 lines
1.9 KiB
Nix

{ stdenv, fetchurl, binutils, popt, makeWrapper, gawk, which, gnugrep, zlib
, pkgconfig
, withGUI ? false , qt4 ? null}:
# libX11 is needed because the Qt build stuff automatically adds `-lX11'.
assert withGUI -> qt4 != null;
stdenv.mkDerivation rec {
name = "oprofile-0.9.9";
src = fetchurl {
url = "mirror://sourceforge/oprofile/${name}.tar.gz";
sha256 = "15vm24jhw4xfd55pfw1rlpzfsh4bl1vyjsajs78bi9xbv8038lhy";
};
patchPhase = ''
sed -i "utils/opcontrol" \
-e "s|OPCONTROL=.*$|OPCONTROL=\"$out/bin/opcontrol\"|g ;
s|OPDIR=.*$|OPDIR=\"$out/bin\"|g ;
s|^PATH=.*$||g"
'';
buildInputs = [ binutils zlib popt makeWrapper gawk which gnugrep pkgconfig ]
++ stdenv.lib.optionals withGUI [ qt4 ];
configureFlags = [
"--disable-shared" # needed because only the static libbfd is available
]
++ stdenv.lib.optional withGUI "--with-qt-dir=${qt4} --enable-gui=qt4";
postInstall = ''
wrapProgram "$out/bin/opcontrol" \
--prefix PATH : "$out/bin:${gawk}/bin:${which}/bin:${gnugrep}/bin"
'';
meta = {
description = "System-wide profiler for Linux";
longDescription = ''
OProfile is a system-wide profiler for Linux systems, capable of
profiling all running code at low overhead. It consists of a
kernel driver and a daemon for collecting sample data, and
several post-profiling tools for turning data into information.
OProfile leverages the hardware performance counters of the CPU
to enable profiling of a wide variety of interesting statistics,
which can also be used for basic time-spent profiling. All code
is profiled: hardware and software interrupt handlers, kernel
modules, the kernel, shared libraries, and applications.
'';
license = stdenv.lib.licenses.gpl2;
homepage = http://oprofile.sourceforge.net/;
platforms = stdenv.lib.platforms.linux;
maintainers = [ ];
};
}