2022-02-10 20:34:41 +00:00
|
|
|
{ lib, stdenv, fetchgit, pkg-config, libbpf, cmake, elfutils, zlib, argp-standalone, musl-obstack }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pahole";
|
2023-02-16 17:41:37 +00:00
|
|
|
# Need a revision that supports DW_TAG_unspecified_type(0x3b).
|
|
|
|
# Was added after 1.24 release in a series of changes.
|
|
|
|
# Can switch back to release tags once 1.25 is cut.
|
|
|
|
version = "1.24-unstable-2022-11-24";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git";
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = "02d67c51765dfbd5893087da63744c864c7cc9e0";
|
|
|
|
hash = "sha256-hKc8UKxPtEM2zlYmolSt1pXJKNRt4wC/Uf+dP/Sb7+s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = [ elfutils zlib libbpf ]
|
2022-10-30 15:09:59 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isMusl [
|
2022-02-10 20:34:41 +00:00
|
|
|
argp-standalone
|
|
|
|
musl-obstack
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Put libraries in "lib" subdirectory, not top level of $out
|
2021-12-06 16:07:01 +00:00
|
|
|
cmakeFlags = [ "-D__LIB=lib" "-DLIBBPF_EMBEDDED=OFF" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git/";
|
2023-02-02 18:25:31 +00:00
|
|
|
description = "Shows, manipulates, and pretty-prints debugging information in DWARF, CTF, and BTF formats";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
platforms = platforms.linux;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ bosu martinetd ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|