prevail: rename from ebpf-verifier; unstable-2023-07-15 -> 0.2.0

This commit is contained in:
Xiangyan Sun
2026-04-01 02:02:39 -07:00
parent d3d48af509
commit cf18e132dc
5 changed files with 54 additions and 30 deletions
@@ -4,28 +4,30 @@
fetchFromGitHub,
boost,
cmake,
catch2,
catch2_3,
microsoft-gsl,
pkg-config,
replaceVars,
yaml-cpp,
}:
stdenv.mkDerivation {
pname = "ebpf-verifier";
version = "unstable-2023-07-15";
stdenv.mkDerivation (finalAttrs: {
pname = "prevail";
version = "0.2.0";
src = fetchFromGitHub {
owner = "vbpf";
repo = "ebpf-verifier";
rev = "de14d3aa3cd2845b621faf32b599766a66e158cf";
repo = "prevail";
rev = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-gnxB8ZLbTyIYpd61T57LPKFm1MHufeVEq/qN9pu2Vpk=";
hash = "sha256-qlQSoz9GE2Z2rzmrPIj+HnIQmNxiBSgvR40FR9psuDc=";
};
patches = [
(replaceVars ./remove-fetchcontent-usage.patch {
# We will download them instead of cmake's fetchContent
catch2Src = catch2.src;
catch2Src = catch2_3.src;
gslSrc = microsoft-gsl.src;
})
];
@@ -39,21 +41,35 @@ stdenv.mkDerivation {
yaml-cpp
];
cmakeFlags = [
(lib.cmakeBool "prevail_ENABLE_TESTS" finalAttrs.doCheck)
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ../check $out/bin/ebpf-verifier
cp ../bin/prevail $out/bin/prevail
runHook postInstall
'';
doCheck = true;
checkPhase = ''
runHook preCheck
pushd ..
bin/tests
popd
runHook postCheck
'';
meta = {
description = "eBPF verifier based on abstract interpretation";
homepage = "https://github.com/vbpf/ebpf-verifier";
homepage = "https://github.com/vbpf/prevail";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = [ ];
mainProgram = "ebpf-verifier";
mainProgram = "prevail";
};
}
})
@@ -0,0 +1,25 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,9 +75,7 @@
endif ()
FetchContent_Declare(GSL
- GIT_REPOSITORY "https://github.com/microsoft/GSL"
- GIT_TAG "v4.2.0"
- GIT_SHALLOW ON
+ SOURCE_DIR "@gslSrc@"
)
set(GSL_INSTALL ON CACHE BOOL "Force GSL install to vendor it with prevail" FORCE)
set(GSL_TEST OFF CACHE BOOL "Skip GSL tests when building as a dependency" FORCE)
@@ -196,9 +194,7 @@
# Tests
if (prevail_ENABLE_TESTS)
FetchContent_Declare(Catch2
- GIT_REPOSITORY "https://github.com/catchorg/Catch2.git"
- GIT_TAG "v3.13.0"
- GIT_SHALLOW ON
+ SOURCE_DIR "@catch2Src@"
)
FetchContent_MakeAvailable(Catch2)
@@ -1,14 +0,0 @@
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)
+1
View File
@@ -622,6 +622,7 @@ mapAliases {
e17gtk = throw "'e17gtk' has been removed because it was archived upstream."; # Added 2026-01-15
eask = throw "'eask' has been renamed to/replaced by 'eask-cli'"; # Converted to throw 2025-10-27
easyloggingpp = throw "easyloggingpp has been removed, as it is deprecated upstream and does not build with CMake 4"; # Added 2025-09-17
ebpf-verifier = warnAlias "'ebpf-verifier' has been renamed to 'prevail'" prevail; # Added 2026-04-01
EBTKS = throw "'EBTKS' has been renamed to/replaced by 'ebtks'"; # Converted to throw 2025-10-27
ec2-utils = throw "'ec2-utils' has been renamed to/replaced by 'amazon-ec2-utils'"; # Converted to throw 2025-10-27
ecryptfs = throw "'ecryptfs' has been removed due to lack of maintenance. Consider using 'fscrypt', 'gocryptfs' or 'cryfs' instead."; # Added 2026-01-14
-4
View File
@@ -349,10 +349,6 @@ with pkgs;
dnf4 = python3Packages.callPackage ../development/python-modules/dnf4/wrapper.nix { };
ebpf-verifier = callPackage ../tools/networking/ebpf-verifier {
catch2 = catch2_3;
};
enochecker-test = with python3Packages; callPackage ../development/tools/enochecker-test { };
inherit (gridlock) nyarr;