Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

ebpf-verifier: init at 2023-07-15

authored by Gaël Reyrol and committed by Anderson Torres 4fe0dfd1 ad8ff8a4

+85
+60
pkgs/tools/networking/ebpf-verifier/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , boost 5 + , cmake 6 + , catch2 7 + , pkg-config 8 + , substituteAll 9 + , yaml-cpp 10 + }: 11 + 12 + stdenv.mkDerivation (finalAttrs: { 13 + pname = "ebpf-verifier"; 14 + version = "unstable-2023-07-15"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "vbpf"; 18 + repo = "ebpf-verifier"; 19 + rev = "de14d3aa3cd2845b621faf32b599766a66e158cf"; 20 + fetchSubmodules = true; 21 + hash = "sha256-gnxB8ZLbTyIYpd61T57LPKFm1MHufeVEq/qN9pu2Vpk="; 22 + }; 23 + 24 + patches = [ 25 + (substituteAll { 26 + # We will download them instead of cmake's fetchContent 27 + src = ./remove-fetchcontent-usage.patch; 28 + catch2Src = catch2.src; 29 + }) 30 + ]; 31 + 32 + nativeBuildInputs = [ 33 + pkg-config 34 + cmake 35 + ]; 36 + 37 + buildInputs = [ 38 + boost 39 + yaml-cpp 40 + ]; 41 + 42 + cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; 43 + 44 + installPhase = '' 45 + runHook preInstall 46 + 47 + mkdir -p $out/bin 48 + cp ../check $out/bin/ebpf-verifier 49 + 50 + runHook postInstall 51 + ''; 52 + 53 + meta = with lib; { 54 + description = "eBPF verifier based on abstract interpretation"; 55 + homepage = "https://github.com/vbpf/ebpf-verifier"; 56 + license = licenses.mit; 57 + platforms = platforms.linux; 58 + maintainers = with maintainers; [ gaelreyrol ]; 59 + }; 60 + })
+14
pkgs/tools/networking/ebpf-verifier/remove-fetchcontent-usage.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index d7cf256..cb94e5a 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -6,8 +6,7 @@ project(ebpf_verifier) 6 + include(FetchContent) 7 + FetchContent_Declare( 8 + Catch2 9 + - GIT_REPOSITORY https://github.com/catchorg/Catch2.git 10 + - GIT_TAG ac93f1943762f6fc92f0dc5bac0d720a33a27530 11 + + SOURCE_DIR @catch2Src@ 12 + ) 13 + FetchContent_MakeAvailable(Catch2) 14 +
+11
pkgs/top-level/all-packages.nix
··· 591 591 592 592 eclipse-mat = callPackage ../development/tools/eclipse-mat { }; 593 593 594 + ebpf-verifier = callPackage ../tools/networking/ebpf-verifier { 595 + # Replace this to `catch2 = catch2_3` when catch2 3.4.0 is merged 596 + # https://github.com/NixOS/nixpkgs/pull/243485 597 + catch2.src = fetchFromGitHub { 598 + owner = "catchorg"; 599 + repo = "Catch2"; 600 + rev = "v3.4.0"; 601 + hash = "sha256-DqGGfNjKPW9HFJrX9arFHyNYjB61uoL6NabZatTWrr0="; 602 + }; 603 + }; 604 + 594 605 edgedb = callPackage ../tools/networking/edgedb { 595 606 inherit (darwin.apple_sdk.frameworks) CoreServices Security; 596 607 };