2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchgit, pkg-config, libbpf, cmake, elfutils, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pahole";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.22";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git";
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-U1/i9WNlLphPIcNysC476sqil/q9tMYmu+Y6psga8I0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ elfutils zlib libbpf ];
|
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; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://git.kernel.org/cgit/devel/pahole/pahole.git/";
|
|
|
|
description = "Pahole and other DWARF utils";
|
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
|
|
|
};
|
|
|
|
}
|