2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, boost
|
|
|
|
, cmake
|
|
|
|
, catch2
|
|
|
|
, pkg-config
|
|
|
|
, substituteAll
|
|
|
|
, yaml-cpp
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "ebpf-verifier";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
}
|