2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, libunwind, buildPackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "strace";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "5.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://strace.io/files/${version}/${pname}-${version}.tar.xz";
|
2021-05-03 20:48:10 +00:00
|
|
|
sha256 = "sha256-KRce350lL4nJiKTDQN/exmL0WMuMY9hUMdZLq1kR58Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
# On RISC-V platforms, LLVM's libunwind implementation is unsupported by strace.
|
|
|
|
# The build will silently fall back and -k will not work on RISC-V.
|
|
|
|
buildInputs = [ perl.out libunwind ]; # support -k
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
postPatch = "patchShebangs --host strace-graph";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
configureFlags = [ "--enable-mpers=check" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
2021-05-04 21:07:42 +00:00
|
|
|
maintainers = with maintainers; [ globin ma27 qyliss ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|