@@ -0,0 +1,27 @@
1+{ stdenv, fetchgit, cmake, elfutils, zlib }:
2+
3+stdenv.mkDerivation {
4+ name = "pahole-head";
5+ src = fetchgit {
6+ url = https://git.kernel.org/pub/scm/devel/pahole/pahole.git;
7+ sha256 = "05f8a14ea6c200c20e9c6738593b38e4ced73a9cef86499ccd7af910eb9b74b3";
8+ rev = "1decb1bc4a412a0902b7b25190d755a875022d03";
9+ };
10+ buildInputs = [ cmake elfutils zlib ];
11+
12+ postInstall = ''
13+ for p in $out/bin/*; do
14+ rpath=`patchelf --print-rpath $p`:$out
15+ patchelf --set-rpath $rpath $p
16+ done
17+ '';
18+
19+ meta = with stdenv.lib; {
20+ homepage = https://git.kernel.org/cgit/devel/pahole/pahole.git/;
21+ description = "Pahole and other DWARF utils";
22+ license = licenses.gpl2;
23+
24+ platforms = platforms.linux;
25+ maintainers = [ maintainers.bosu ];
26+ };
27+}