summary refs log tree commit diff
path: root/pkgs/development/tools/misc/ltrace/default.nix
blob: e1d9ae6b5513b4d78c1fb82285a270ce7bc89053 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, stdenv, fetchurl, elfutils, libunwind }:

stdenv.mkDerivation {
  name = "ltrace-0.7.3";

  src = fetchurl {
    url = "mirror://debian/pool/main/l/ltrace/ltrace_0.7.3.orig.tar.bz2";
    sha256 = "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf";
  };

  buildInputs = [ elfutils libunwind ];

  prePatch = let
      debian = fetchurl {
        url = "mirror://debian/pool/main/l/ltrace/ltrace_0.7.3-6.debian.tar.xz";
        sha256 = "0xc4pfd8qw53crvdxr29iwl8na53zmknca082kziwpvlzsick4kp";
      };
    in ''
      tar xf '${debian}'
      patches="$patches $(cat debian/patches/series | sed 's|^|debian/patches/|')"
    '';

  meta = with lib; {
    description = "Library call tracer";
    homepage = "https://www.ltrace.org/";
    platforms = [ "i686-linux" "x86_64-linux" ];
    license = licenses.gpl2;
  };
}