2022-08-21 13:32:41 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, libunwind, buildPackages, gitUpdater }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "strace";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "6.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://strace.io/files/${version}/${pname}-${version}.tar.xz";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-37BRcCOJ4ZeaFRiStZAa/J6Tu8HHDYTJBq3jIkypGYA=";
|
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
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
# No nicer place to find latest release.
|
|
|
|
url = "https://github.com/strace/strace.git";
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|