diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2023-05-19 21:03:26 +0900 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2023-05-19 22:36:22 -0500 |
commit | a2b91c07c30eb583b58077e6f9bcf69168745ae7 (patch) | |
tree | 3820d3c41c10f820e6335de3c8c28774d6146490 /pkgs/os-specific/linux | |
parent | 6ef1311212df22e0fadedc261c3cf3deb99a5e78 (diff) | |
download | nixpkgs-a2b91c07c30eb583b58077e6f9bcf69168745ae7.tar nixpkgs-a2b91c07c30eb583b58077e6f9bcf69168745ae7.tar.gz nixpkgs-a2b91c07c30eb583b58077e6f9bcf69168745ae7.tar.bz2 nixpkgs-a2b91c07c30eb583b58077e6f9bcf69168745ae7.tar.lz nixpkgs-a2b91c07c30eb583b58077e6f9bcf69168745ae7.tar.xz nixpkgs-a2b91c07c30eb583b58077e6f9bcf69168745ae7.tar.zst nixpkgs-a2b91c07c30eb583b58077e6f9bcf69168745ae7.zip |
bpftrace: 0.17.1 -> 0.18.0
- Add patch to fix build - While we're here uniformize style a bit, so there's lot of fluff, but it's really just version bump + patch...
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r-- | pkgs/os-specific/linux/bpftrace/default.nix | 58 |
1 files changed, 36 insertions, 22 deletions
diff --git a/pkgs/os-specific/linux/bpftrace/default.nix b/pkgs/os-specific/linux/bpftrace/default.nix index 0ba6db131b8..7dca9eee7a0 100644 --- a/pkgs/os-specific/linux/bpftrace/default.nix +++ b/pkgs/os-specific/linux/bpftrace/default.nix @@ -1,42 +1,56 @@ -{ lib, stdenv, fetchFromGitHub -, cmake, pkg-config, flex, bison -, llvmPackages, elfutils -, libbfd, libbpf, libopcodes, bcc +{ lib, stdenv, fetchFromGitHub, fetchpatch +, llvmPackages, elfutils, bcc +, libbpf, libbfd, libopcodes , cereal, asciidoctor -, nixosTests +, cmake, pkg-config, flex, bison , util-linux +, nixosTests }: stdenv.mkDerivation rec { pname = "bpftrace"; - version = "0.17.1"; + version = "0.18.0"; src = fetchFromGitHub { - owner = "iovisor"; - repo = "bpftrace"; - rev = "v${version}"; - sha256 = "sha256-dEchHXZPWc+/Dui6P65EqxB8O/M7F47PZVsKSp80oXE="; + owner = "iovisor"; + repo = "bpftrace"; + rev = "v${version}"; + hash = "sha256-+SBLcMyOf1gZN8dG5xkNLsqIcK1eVlswjY1GRXepFVg="; }; - buildInputs = with llvmPackages; - [ llvm libclang - elfutils bcc - libbpf libbfd libopcodes - cereal asciidoctor - ]; + patches = [ + # fails to build - https://github.com/iovisor/bpftrace/issues/2598 + (fetchpatch { + name = "link-binaries-against-zlib"; + url = "https://github.com/iovisor/bpftrace/commit/a60b171eb288250c3f1d6f065b05d8a87aff3cdd.patch"; + hash = "sha256-b/0pKDjolo2RQ/UGjEfmWdG0tnIiFX8PJHhRCXvzyxA="; + }) + ]; + + buildInputs = with llvmPackages; [ + llvm libclang + elfutils bcc + libbpf libbfd libopcodes + cereal asciidoctor + ]; - nativeBuildInputs = [ cmake pkg-config flex bison llvmPackages.llvm.dev util-linux ]; + nativeBuildInputs = [ + cmake pkg-config flex bison + llvmPackages.llvm.dev + util-linux + ]; # tests aren't built, due to gtest shenanigans. see: # # https://github.com/iovisor/bpftrace/issues/161#issuecomment-453606728 # https://github.com/iovisor/bpftrace/pull/363 # - cmakeFlags = - [ "-DBUILD_TESTING=FALSE" - "-DLIBBCC_INCLUDE_DIRS=${bcc}/include" - "-DINSTALL_TOOL_DOCS=off" - ]; + cmakeFlags = [ + "-DBUILD_TESTING=FALSE" + "-DLIBBCC_INCLUDE_DIRS=${bcc}/include" + "-DINSTALL_TOOL_DOCS=OFF" + "-DUSE_SYSTEM_BPF_BCC=ON" + ]; # Pull BPF scripts into $PATH (next to their bcc program equivalents), but do # not move them to keep `${pkgs.bpftrace}/share/bpftrace/tools/...` working. |