Added ltrace - library call tracer. Note that it needed adding an extension point to doUnpack, but it doesn't force full rebuild of everything using builder composing.

svn path=/nixpkgs/trunk/; revision=9574
This commit is contained in:
Michael Raskin 2007-11-03 08:19:00 +00:00
parent 56cd763e46
commit f723c676b8
3 changed files with 39 additions and 2 deletions

View File

@ -0,0 +1,30 @@
args : with args;
with builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.orig.tar.gz;
sha256 = "1nbjcnizc0w3p41g7hqf1qiany8qk4xs9g4zrlq4fpxdykdwla3v";
};
buildInputs = [elfutils ];
configureFlags = [];
goSrcDir = "
cd ltrace-*;
";
} null; /* null is a terminator for sumArgs */
with stringsWithDeps;
let
preConfigure = FullDepEntry ("
sed -e 's@-o root -g root@@' -i Makefile.in;
") [doUnpack minInit];
in
stdenv.mkDerivation rec {
name = "ltrace-0.5";
builder = writeScript (name + "-builder")
(textClosure [preConfigure doConfigure doMakeInstall doForceShare]);
meta = {
description = "
Library call tracer.
";
};
}

View File

@ -1353,6 +1353,11 @@ rec {
inherit fetchurl stdenv;
};
ltrace = import ../development/tools/misc/ltrace {
inherit fetchurl stdenv builderDefs stringsWithDeps lib
elfutils;
};
mk = import ../development/tools/build-managers/mk {
inherit fetchurl stdenv;
};

View File

@ -117,7 +117,7 @@ rec
}
") [minInit];
toSrcDir = s : FullDepEntry (if (archiveType s) == "tar" then "
toSrcDir = s : FullDepEntry ((if (archiveType s) == "tar" then "
tar xvf ${s}
cd \"\$(tar tf ${s} | head -1 | sed -e 's@/.*@@' )\"
" else if (archiveType s) == "tgz" then "
@ -126,7 +126,9 @@ rec
" else if (archiveType s) == "tbz2" then "
tar xvjf ${s}
cd \"\$(tar tjf ${s} | head -1 | sed -e 's@/.*@@' )\"
" else (abort "unknown archive type : ${s}")) [minInit];
" else (abort "unknown archive type : ${s}"))+
(if args ? goSrcDir then args.goSrcDir else "")
) [minInit];
doConfigure = FullDepEntry ("
./configure --prefix=\"\$prefix\" ${toString (getAttr ["configureFlags"] "" args)}