2022-01-11 16:26:52 +00:00
|
|
|
{ lib, stdenv, fetchgit, pkg-config, libbpf, cmake, elfutils, zlib, argp-standalone, musl-obstack }:
|
2015-07-11 11:11:14 +00:00
|
|
|
|
2018-09-19 22:28:05 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-06-27 23:54:27 +00:00
|
|
|
pname = "pahole";
|
2021-12-20 13:00:12 +00:00
|
|
|
version = "1.23";
|
2015-07-11 11:11:14 +00:00
|
|
|
src = fetchgit {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git";
|
2018-09-19 22:28:05 +00:00
|
|
|
rev = "v${version}";
|
2021-12-20 13:00:12 +00:00
|
|
|
sha256 = "sha256-Dt3ZcUfjwdtTTv6qRFRgwK5GFWXdpN7fvb9KhpS1O94=";
|
2015-07-11 11:11:14 +00:00
|
|
|
};
|
|
|
|
|
2021-12-03 23:55:48 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2022-01-11 16:26:52 +00:00
|
|
|
buildInputs = [ elfutils zlib libbpf ]
|
|
|
|
++ lib.optional stdenv.hostPlatform.isMusl [
|
|
|
|
argp-standalone
|
|
|
|
musl-obstack
|
|
|
|
];
|
2018-09-19 22:28:05 +00:00
|
|
|
|
|
|
|
# Put libraries in "lib" subdirectory, not top level of $out
|
2021-12-03 23:55:48 +00:00
|
|
|
cmakeFlags = [ "-D__LIB=lib" "-DLIBBPF_EMBEDDED=OFF" ];
|
2015-07-11 11:11:14 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2022-06-05 15:36:26 +00:00
|
|
|
homepage = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git/";
|
2015-07-11 11:11:14 +00:00
|
|
|
description = "Pahole and other DWARF utils";
|
2021-03-17 06:42:04 +00:00
|
|
|
license = licenses.gpl2Only;
|
2015-07-11 11:11:14 +00:00
|
|
|
|
|
|
|
platforms = platforms.linux;
|
2021-12-03 23:55:48 +00:00
|
|
|
maintainers = with maintainers; [ bosu martinetd ];
|
2015-07-11 11:11:14 +00:00
|
|
|
};
|
|
|
|
}
|