14 stdenv.mkDerivation rec {
18 url = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-${version}.tar.gz";
19 hash = "sha256-Lf9Z4vHRFplMrUf4VhJ7EDPn+S4RaS1Emm0wyEcG2HU=";
22 nativeBuildInputs = [ cmake pkg-config ];
23 buildInputs = [ elfutils zlib libbpf ]
24 ++ lib.optionals stdenv.hostPlatform.isMusl [
29 patches = [ ./threading-reproducibility.patch ];
31 # Put libraries in "lib" subdirectory, not top level of $out
32 cmakeFlags = [ "-D__LIB=lib" "-DLIBBPF_EMBEDDED=OFF" ];
35 inherit (nixosTests) bpf;
39 homepage = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git/";
40 description = "Shows, manipulates, and pretty-prints debugging information in DWARF, CTF, and BTF formats";
41 license = licenses.gpl2Only;
43 platforms = platforms.linux;
44 maintainers = with maintainers; [ bosu martinetd ];