From 56f1fe73e9ef18cac349e78b060295464d23db5d Mon Sep 17 00:00:00 2001 From: Martin Bravenboer Date: Fri, 11 Nov 2005 16:54:03 +0000 Subject: [PATCH] Added callgrind, which is an extraordinary sexy tool for call graphs and profiling based onvalgrind svn path=/nixpkgs/trunk/; revision=4259 --- .../tools/misc/callgrind/builder.sh | 9 ++++++++ .../tools/misc/callgrind/default.nix | 21 +++++++++++++++++++ pkgs/system/all-packages-generic.nix | 4 ++++ 3 files changed, 34 insertions(+) create mode 100644 pkgs/development/tools/misc/callgrind/builder.sh create mode 100644 pkgs/development/tools/misc/callgrind/default.nix diff --git a/pkgs/development/tools/misc/callgrind/builder.sh b/pkgs/development/tools/misc/callgrind/builder.sh new file mode 100644 index 000000000000..7431ea5e7ff6 --- /dev/null +++ b/pkgs/development/tools/misc/callgrind/builder.sh @@ -0,0 +1,9 @@ +source $stdenv/setup + +tar jxvf $valgrindsrc || fail +cd valgrind-* || fail +./configure --prefix=$out || fail +make || fail +make install || fail + +genericBuild diff --git a/pkgs/development/tools/misc/callgrind/default.nix b/pkgs/development/tools/misc/callgrind/default.nix new file mode 100644 index 000000000000..c65b25d707af --- /dev/null +++ b/pkgs/development/tools/misc/callgrind/default.nix @@ -0,0 +1,21 @@ +# Valgrind has to be in the same prefix and I didn't feel like +# patching. So, valgrind is installed here as well. + +{stdenv, fetchurl, which, perl}: + +stdenv.mkDerivation { + name = "callgrind-0.10.0"; + builder = ./builder.sh; + + src = fetchurl { + url = http://kcachegrind.sourceforge.net/callgrind-0.10.0.tar.gz; + md5 = "3bd2afd50fde7db4bd5a59dcb412d5e7"; + }; + + valgrindsrc = fetchurl { + url = http://valgrind.org/downloads/valgrind-3.0.1.tar.bz2; + md5 = "c29efdb7d1a93440f5644a6769054681"; + }; + + buildInputs = [which perl]; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index bc091628ca79..1d5e28f85814 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -366,6 +366,10 @@ rec { inherit fetchurl stdenv; }; + callgrind = (import ../development/tools/misc/callgrind) { + inherit fetchurl stdenv which perl; + }; + texinfo = (import ../development/tools/misc/texinfo) { inherit fetchurl stdenv ncurses; };