2024-01-30 17:16:21 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, libunwind, buildPackages, gitUpdater, elfutils }:
|
2004-08-04 10:12:26 +00:00
|
|
|
|
2010-01-20 10:55:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "strace";
|
2024-11-18 21:14:44 +00:00
|
|
|
version = "6.12";
|
2009-11-08 00:32:12 +00:00
|
|
|
|
2004-08-04 10:12:26 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://strace.io/files/${version}/${pname}-${version}.tar.xz";
|
2024-11-18 21:14:44 +00:00
|
|
|
hash = "sha256-xH2pO+RbYFX03HQdfyDvr1DKEBYKWxAMEJspT9nAvf4=";
|
2010-01-20 10:55:30 +00:00
|
|
|
};
|
|
|
|
|
2024-11-06 13:10:36 +00:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
2018-02-28 01:31:15 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ perl ];
|
2011-06-15 13:28:04 +00:00
|
|
|
|
2024-09-30 06:40:27 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2024-02-19 00:37:06 +00:00
|
|
|
# libunwind for -k.
|
2021-06-05 02:02:19 +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.
|
2024-02-19 00:37:06 +00:00
|
|
|
buildInputs = [ libunwind ]
|
|
|
|
# -kk
|
|
|
|
++ lib.optional (lib.meta.availableOn stdenv.hostPlatform elfutils) elfutils;
|
2020-04-02 20:24:50 +00:00
|
|
|
|
2024-07-27 03:50:02 +00:00
|
|
|
configureFlags = [ "--enable-mpers=check" ]
|
|
|
|
++ lib.optional stdenv.cc.isClang "CFLAGS=-Wno-unused-function";
|
2018-02-20 19:33:56 +00:00
|
|
|
|
2022-08-14 11:42:49 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
# No nicer place to find latest release.
|
|
|
|
url = "https://github.com/strace/strace.git";
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2019-12-08 21:26:10 +00:00
|
|
|
homepage = "https://strace.io/";
|
2010-01-20 10:55:30 +00:00
|
|
|
description = "System call tracer for Linux";
|
2018-12-29 03:27:32 +00:00
|
|
|
license = with licenses; [ lgpl21Plus gpl2Plus ]; # gpl2Plus is for the test suite
|
2013-08-06 21:43:51 +00:00
|
|
|
platforms = platforms.linux;
|
2021-05-04 12:14:59 +00:00
|
|
|
maintainers = with maintainers; [ globin ma27 qyliss ];
|
2023-10-10 10:51:10 +00:00
|
|
|
mainProgram = "strace";
|
2004-08-04 10:12:26 +00:00
|
|
|
};
|
|
|
|
}
|