From c87348b2c154df46c16f81630bd61990bb8b1885 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Tue, 14 May 2024 14:20:12 +0900 Subject: [PATCH 1/2] bcc/bpftrace: add missing platforms=linux bcc and bpftrace depend on bpf which is linux-specific --- pkgs/by-name/bc/bcc/package.nix | 1 + pkgs/by-name/bp/bpftrace/package.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/pkgs/by-name/bc/bcc/package.nix b/pkgs/by-name/bc/bcc/package.nix index 3cf9b26f4fdd..ae8ab4fcaccb 100644 --- a/pkgs/by-name/bc/bcc/package.nix +++ b/pkgs/by-name/bc/bcc/package.nix @@ -118,5 +118,6 @@ python3.pkgs.buildPythonApplication rec { homepage = "https://iovisor.github.io/bcc/"; license = licenses.asl20; maintainers = with maintainers; [ ragge mic92 thoughtpolice martinetd ]; + platforms = platforms.linux; }; } diff --git a/pkgs/by-name/bp/bpftrace/package.nix b/pkgs/by-name/bp/bpftrace/package.nix index 068f4532451b..dff13ecab56a 100644 --- a/pkgs/by-name/bp/bpftrace/package.nix +++ b/pkgs/by-name/bp/bpftrace/package.nix @@ -67,5 +67,6 @@ stdenv.mkDerivation rec { mainProgram = "bpftrace"; license = licenses.asl20; maintainers = with maintainers; [ rvl thoughtpolice martinetd mfrw ]; + platforms = platforms.linux; }; } From 27e5b8e6ec24509b457a4332e60793d0e1e7e52c Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Fri, 10 May 2024 21:44:12 +0900 Subject: [PATCH 2/2] bcc/bpftrace: use default llvmPackages In practice, that is llvmPackages_16 -> llvmPackages_17. This doesn't seem to bring anything useful, but we shouldn't pull in an older llvm version for no reason as that'll increase system closure size Back when we set a specific version the default linux version was very old and having a more modern version brought in some candies, but it doesn't seem to be as true now clang supports bpf well. Conversely the latest llvm 18 isn't supported yet by the latest release of bpftrace, but it works with bcc's, and bpftrace master also has support so it won't be far behind: the nixos default version shouldn't break, so let's use it. --- pkgs/top-level/all-packages.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 32ad40e71986..9298ee38b43a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18318,14 +18318,6 @@ with pkgs; bpftools = callPackage ../os-specific/linux/bpftools { }; - bcc = callPackage ../by-name/bc/bcc/package.nix { - llvmPackages = llvmPackages_16; - }; - - bpftrace = callPackage ../by-name/bp/bpftrace/package.nix { - llvmPackages = llvmPackages_16; - }; - bpm-tools = callPackage ../tools/audio/bpm-tools { }; byacc = callPackage ../development/tools/parsing/byacc { };