23 stdenv.mkDerivation rec {
27 src = fetchFromGitHub {
31 hash = "sha256-3qtErf3+T73DE40d6F8vFK1TdHcM/56AYFGGzxpRIug=";
34 buildInputs = with llvmPackages; [
56 "-DLIBBCC_INCLUDE_DIRS=${bcc}/include"
57 "-DINSTALL_TOOL_DOCS=OFF"
58 "-DSYSTEM_INCLUDE_PATHS=${glibc.dev}/include"
61 # Pull BPF scripts into $PATH (next to their bcc program equivalents), but do
62 # not move them to keep `${pkgs.bpftrace}/share/bpftrace/tools/...` working.
64 ln -sr $out/share/bpftrace/tools/*.bt $out/bin/
65 # do not use /usr/bin/env for shipped tools
66 # If someone can get patchShebangs to work here please fix.
67 sed -i -e "1s:#!/usr/bin/env bpftrace:#!$out/bin/bpftrace:" $out/share/bpftrace/tools/*.bt
80 description = "High-level tracing language for Linux eBPF";
81 homepage = "https://github.com/bpftrace/bpftrace";
82 changelog = "https://github.com/bpftrace/bpftrace/releases/tag/v${version}";
83 mainProgram = "bpftrace";
84 license = licenses.asl20;
85 maintainers = with maintainers; [
92 platforms = platforms.linux;