ebpf-verifier: init at 2023-07-15
This commit is contained in:
committed by
Anderson Torres
parent
ad8ff8a4a8
commit
4fe0dfd1ea
@@ -0,0 +1,60 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, boost
|
||||
, cmake
|
||||
, catch2
|
||||
, pkg-config
|
||||
, substituteAll
|
||||
, yaml-cpp
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ebpf-verifier";
|
||||
version = "unstable-2023-07-15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vbpf";
|
||||
repo = "ebpf-verifier";
|
||||
rev = "de14d3aa3cd2845b621faf32b599766a66e158cf";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-gnxB8ZLbTyIYpd61T57LPKFm1MHufeVEq/qN9pu2Vpk=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
# We will download them instead of cmake's fetchContent
|
||||
src = ./remove-fetchcontent-usage.patch;
|
||||
catch2Src = catch2.src;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
yaml-cpp
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp ../check $out/bin/ebpf-verifier
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "eBPF verifier based on abstract interpretation";
|
||||
homepage = "https://github.com/vbpf/ebpf-verifier";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ gaelreyrol ];
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d7cf256..cb94e5a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -6,8 +6,7 @@ project(ebpf_verifier)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
- GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
- GIT_TAG ac93f1943762f6fc92f0dc5bac0d720a33a27530
|
||||
+ SOURCE_DIR @catch2Src@
|
||||
)
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
|
||||
@@ -591,6 +591,17 @@ with pkgs;
|
||||
|
||||
eclipse-mat = callPackage ../development/tools/eclipse-mat { };
|
||||
|
||||
ebpf-verifier = callPackage ../tools/networking/ebpf-verifier {
|
||||
# Replace this to `catch2 = catch2_3` when catch2 3.4.0 is merged
|
||||
# https://github.com/NixOS/nixpkgs/pull/243485
|
||||
catch2.src = fetchFromGitHub {
|
||||
owner = "catchorg";
|
||||
repo = "Catch2";
|
||||
rev = "v3.4.0";
|
||||
hash = "sha256-DqGGfNjKPW9HFJrX9arFHyNYjB61uoL6NabZatTWrr0=";
|
||||
};
|
||||
};
|
||||
|
||||
edgedb = callPackage ../tools/networking/edgedb {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices Security;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user