summary refs log tree commit diff
path: root/pkgs/os-specific/linux/bpftool
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2019-05-06 02:31:22 -0500
committerAustin Seipp <aseipp@pobox.com>2019-05-12 22:12:30 -0500
commit46b7153d577d0ebb000f8b369260bd2c6e975c18 (patch)
treed28945475ab52eb028f999aea31ae92967957ced /pkgs/os-specific/linux/bpftool
parent8e4df4840ed3427fb84190e25d2c357740ff028b (diff)
downloadnixpkgs-46b7153d577d0ebb000f8b369260bd2c6e975c18.tar
nixpkgs-46b7153d577d0ebb000f8b369260bd2c6e975c18.tar.gz
nixpkgs-46b7153d577d0ebb000f8b369260bd2c6e975c18.tar.bz2
nixpkgs-46b7153d577d0ebb000f8b369260bd2c6e975c18.tar.lz
nixpkgs-46b7153d577d0ebb000f8b369260bd2c6e975c18.tar.xz
nixpkgs-46b7153d577d0ebb000f8b369260bd2c6e975c18.tar.zst
nixpkgs-46b7153d577d0ebb000f8b369260bd2c6e975c18.zip
bpftool: init at 5.1.1
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/os-specific/linux/bpftool')
-rw-r--r--pkgs/os-specific/linux/bpftool/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/bpftool/default.nix b/pkgs/os-specific/linux/bpftool/default.nix
new file mode 100644
index 00000000000..cc4786ab384
--- /dev/null
+++ b/pkgs/os-specific/linux/bpftool/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl
+, libopcodes, libbfd, libelf
+, linuxPackages_latest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bpftool";
+  inherit (linuxPackages_latest.kernel) version src;
+
+  buildInputs = [ libopcodes libbfd libelf ];
+
+  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 ];
+  };
+}