feat: fixed pcap linking and added nix packages

This commit is contained in:
Andrew Rioux
2025-01-20 20:39:26 -05:00
parent ad8cad56e7
commit af2e832762
23 changed files with 1220 additions and 81 deletions
+14
View File
@@ -0,0 +1,14 @@
{
if std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "freebsd" {
let freebsd_libs = std::env::var("FREEBSD_LIBS").unwrap();
println!("cargo:rustc-link-arg=--sysroot={freebsd_libs}");
println!("cargo:rustc-link-arg=-L{freebsd_libs}/lib");
println!("cargo:rustc-link-arg=-L{freebsd_libs}/usr/lib");
}
if std::env::var("CARGO_CFG_TARGET_ENV").unwrap() == "gnu" && std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "linux" {
let glibc_libs = std::env::var("GLIBC_LIBS").unwrap();
let glibc_libs_static = std::env::var("GLIBC_LIBS_STATIC").unwrap();
println!("cargo:rustc-link-arg=-L{glibc_libs}/lib");
println!("cargo:rustc-link-arg=-L{glibc_libs_static}/lib");
}
}