Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 59 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 boost, 6 cmake, 7 catch2, 8 pkg-config, 9 replaceVars, 10 yaml-cpp, 11}: 12 13stdenv.mkDerivation { 14 pname = "ebpf-verifier"; 15 version = "unstable-2023-07-15"; 16 17 src = fetchFromGitHub { 18 owner = "vbpf"; 19 repo = "ebpf-verifier"; 20 rev = "de14d3aa3cd2845b621faf32b599766a66e158cf"; 21 fetchSubmodules = true; 22 hash = "sha256-gnxB8ZLbTyIYpd61T57LPKFm1MHufeVEq/qN9pu2Vpk="; 23 }; 24 25 patches = [ 26 (replaceVars ./remove-fetchcontent-usage.patch { 27 # We will download them instead of cmake's fetchContent 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 installPhase = '' 43 runHook preInstall 44 45 mkdir -p $out/bin 46 cp ../check $out/bin/ebpf-verifier 47 48 runHook postInstall 49 ''; 50 51 meta = with lib; { 52 description = "eBPF verifier based on abstract interpretation"; 53 homepage = "https://github.com/vbpf/ebpf-verifier"; 54 license = licenses.mit; 55 platforms = platforms.linux; 56 maintainers = with maintainers; [ gaelreyrol ]; 57 mainProgram = "ebpf-verifier"; 58 }; 59}