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