ebpf-sandbox/dropworld/default.nix
2024-12-24 16:46:35 +01:00

16 lines
352 B
Nix

{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
'';
}