summary refs log blame commit diff
path: root/pkgs/os-specific/linux/bpftool/default.nix
blob: 8b288fc046a694ce9615818329292f226b6f8208 (plain) (tree)
1
2
3
4
5
6
7
8
9
        
                            
                            

  
                     


                                                    
                                                  















                                                                           
{ stdenv
, libopcodes, libbfd, libelf
, linuxPackages_latest, zlib
}:

stdenv.mkDerivation {
  pname = "bpftool";
  inherit (linuxPackages_latest.kernel) version src;

  buildInputs = [ libopcodes libbfd libelf zlib ];

  preConfigure = ''
    cd tools/bpf/bpftool
    substituteInPlace ./Makefile \
      --replace '/usr/local' "$out" \
      --replace '/usr'       "$out" \
      --replace '/sbin'      '/bin'
  '';

  meta = with stdenv.lib; {
    description = "Debugging/program analysis tool for the eBPF subsystem";
    license     = [ licenses.gpl2 licenses.bsd2 ];
    platforms   = platforms.linux;
    maintainers = with maintainers; [ thoughtpolice ];
  };
}