2021-01-23 19:26:19 +07:00
|
|
|
{ lib, stdenv, fetchurl, perl, libunwind, buildPackages }:
|
2004-08-04 10:12:26 +00:00
|
|
|
|
2021-04-02 18:03:31 +00:00
|
|
|
# libunwind does not have the supportsHost attribute on darwin, thus
|
|
|
|
|
# when this package is evaluated it causes an evaluation error
|
|
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
|
2010-01-20 10:55:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "strace";
|
2021-09-02 14:08:49 +02:00
|
|
|
version = "5.14";
|
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";
|
2021-09-02 14:08:49 +02:00
|
|
|
sha256 = "sha256-kBvubbXhfeutRTDdn/tNyalsSmVu2+HDFBt8swexHnM=";
|
2010-01-20 10:55:30 +00:00
|
|
|
};
|
|
|
|
|
|
2018-02-27 20:31:15 -05:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ perl ];
|
2011-06-15 13:28:04 +00:00
|
|
|
|
2021-01-23 19:26:19 +07:00
|
|
|
buildInputs = [ perl.out ] ++ lib.optional libunwind.supportsHost libunwind; # support -k
|
2015-11-11 14:58:52 +01:00
|
|
|
|
2020-06-24 20:53:07 -04:00
|
|
|
postPatch = "patchShebangs --host strace-graph";
|
2020-04-02 22:24:50 +02:00
|
|
|
|
2021-01-06 09:11:55 +01:00
|
|
|
configureFlags = [ "--enable-mpers=check" ];
|
2018-02-20 13:33:56 -06:00
|
|
|
|
2021-01-23 19:26:19 +07:00
|
|
|
meta = with lib; {
|
2019-12-08 23:26:10 +02:00
|
|
|
homepage = "https://strace.io/";
|
2010-01-20 10:55:30 +00:00
|
|
|
description = "A system call tracer for Linux";
|
2018-12-28 22:27:32 -05:00
|
|
|
license = with licenses; [ lgpl21Plus gpl2Plus ]; # gpl2Plus is for the test suite
|
2013-08-06 23:43:51 +02:00
|
|
|
platforms = platforms.linux;
|
2021-05-04 12:14:59 +00:00
|
|
|
maintainers = with maintainers; [ globin ma27 qyliss ];
|
2004-08-04 10:12:26 +00:00
|
|
|
};
|
|
|
|
|
}
|