nixpkgs-suyu/pkgs/development/tools/misc/strace/default.nix
2020-10-03 22:57:28 +03:00

28 lines
909 B
Nix

{ stdenv, fetchurl, perl, libunwind, buildPackages }:
stdenv.mkDerivation rec {
pname = "strace";
version = "5.9";
src = fetchurl {
url = "https://strace.io/files/${version}/${pname}-${version}.tar.xz";
sha256 = "1nb6bm6ll6cxd6a2fc67c0qn39gbh6rkqrpv83lw6ijm8sw3wirr";
};
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ];
buildInputs = [ perl.out ] ++ stdenv.lib.optional libunwind.supportsHost libunwind; # support -k
postPatch = "patchShebangs --host strace-graph";
configureFlags = stdenv.lib.optional (!stdenv.hostPlatform.isx86) "--enable-mpers=check";
meta = with stdenv.lib; {
homepage = "https://strace.io/";
description = "A system call tracer for Linux";
license = with licenses; [ lgpl21Plus gpl2Plus ]; # gpl2Plus is for the test suite
platforms = platforms.linux;
maintainers = with maintainers; [ globin ];
};
}