Create helper to build the ebpf programs
This commit is contained in:
parent
6e8387a0a4
commit
95cf4c4270
5 changed files with 15 additions and 35 deletions
|
@ -1,16 +0,0 @@
|
|||
{clangStdenv, libbpf, ...}: clangStdenv.mkDerivation {
|
||||
name = "dropworld";
|
||||
src = ./.;
|
||||
hardeningDisable = [ "stackprotector" "zerocallusedregs" ];
|
||||
dontFixup = true;
|
||||
buildInputs = [ libbpf ];
|
||||
|
||||
buildPhase = ''
|
||||
clang -O2 -target bpf -g -c dropworld.c -o dropworld.o
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp dropworld.o $out
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue