mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 12:43:52 +00:00
d72176e682
We need newer pahole to support `binutils-2.40` which started generating fresh DWARF tags that pahole-1.24 does not yet understand and fails as: $ nix log /nix/store/ckjr3sbsh13y1prigppk2y0jpf0p4icm-linux-6.1.6.drv ... BTF .btf.vmlinux.bin.o Unsupported DW_TAG_unspecified_type(0x3b) Encountered error while encoding BTF. Upstream thread to add the support for it: https://lore.kernel.org/all/YzwkazNc6wNCpQTN@kernel.org/t/
34 lines
1.1 KiB
Nix
34 lines
1.1 KiB
Nix
{ lib, stdenv, fetchgit, pkg-config, libbpf, cmake, elfutils, zlib, argp-standalone, musl-obstack }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pahole";
|
|
# 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";
|
|
src = fetchgit {
|
|
url = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git";
|
|
rev = "02d67c51765dfbd5893087da63744c864c7cc9e0";
|
|
hash = "sha256-hKc8UKxPtEM2zlYmolSt1pXJKNRt4wC/Uf+dP/Sb7+s=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
buildInputs = [ elfutils zlib libbpf ]
|
|
++ lib.optionals stdenv.hostPlatform.isMusl [
|
|
argp-standalone
|
|
musl-obstack
|
|
];
|
|
|
|
# Put libraries in "lib" subdirectory, not top level of $out
|
|
cmakeFlags = [ "-D__LIB=lib" "-DLIBBPF_EMBEDDED=OFF" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git/";
|
|
description = "Pahole and other DWARF utils";
|
|
license = licenses.gpl2Only;
|
|
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ bosu martinetd ];
|
|
};
|
|
}
|