3 # Small wrapper which only exposes `mtrace(3)` from `glibc`. This can't be placed
4 # into `glibc` itself because it depends on Perl which would mean that the final
5 # `glibc` inside a stdenv bootstrap has a dependency `glibc -> perl -> bootstrap tools`,
6 # so this is now in its own package that isn't used for bootstrapping.
8 # `glibc` needs to be overridden here because it's still needed to `./configure` the source in order
9 # to have a build environment where we can call the needed make target.
11 glibc.overrideAttrs (oldAttrs: {
12 pname = "glibc-mtrace";
18 make -C ../glibc-${glibc.minorRelease}/malloc objdir=`pwd` `pwd`/malloc/mtrace;
25 mv malloc/mtrace $out/bin/
28 # Perl checked during configure
29 nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ perl ];
30 # Perl shebang used for `mtrace`.
31 buildInputs = oldAttrs.buildInputs ++ [ perl ];
33 # Reset a few things declared by `pkgs.glibc`.
35 separateDebugInfo = false;
37 meta = oldAttrs.meta // {
38 description = "Perl script used to interpret and provide human readable output of the trace log contained in the file mtracedata, whose contents were produced by mtrace(3).";