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";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "5.17";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://strace.io/files/${version}/${pname}-${version}.tar.xz";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-X7KY29EzH9HhvJTFwyOVhg03YQG4fGzT0bqfmqFcFh8=";
|
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.
|
2021-09-18 10:52:07 +00:00
|
|
|
buildInputs = [ libunwind ]; # support -k
|
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
|
|
|
};
|
|
|
|
}
|