Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
79 lines
1.6 KiB
Nix
79 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
clang,
|
|
fetchFromGitHub,
|
|
buildGoModule,
|
|
versionCheckHook,
|
|
nixosTests,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "dae";
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "daeuniverse";
|
|
repo = "dae";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-RpbWZEoGrCq3Py0hu6YDie6ErDTLS3oabqScPzhCtm0=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
vendorHash = "sha256-u2DCHmX7vRNWIQ2Ir3UrxPGduggEqoUr1rnkDfwsT0I=";
|
|
|
|
proxyVendor = true;
|
|
|
|
nativeBuildInputs = [ clang ];
|
|
|
|
hardeningDisable = [
|
|
"zerocallusedregs"
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
make CFLAGS="-D__REMOVE_BPF_PRINTK -fno-stack-protector -Wno-unused-command-line-argument" \
|
|
NOSTRIP=y \
|
|
VERSION=${finalAttrs.version} \
|
|
OUTPUT=$out/bin/dae
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
# network required
|
|
doCheck = false;
|
|
|
|
postInstall = ''
|
|
install -Dm444 install/dae.service $out/lib/systemd/system/dae.service
|
|
substituteInPlace $out/lib/systemd/system/dae.service \
|
|
--replace-fail "/usr/bin/dae" "$out/bin/dae"
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
versionCheckProgramArg = "--version";
|
|
|
|
passthru = {
|
|
tests = {
|
|
inherit (nixosTests) dae;
|
|
};
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Linux high-performance transparent proxy solution based on eBPF";
|
|
homepage = "https://github.com/daeuniverse/dae";
|
|
license = lib.licenses.agpl3Only;
|
|
maintainers = with lib.maintainers; [
|
|
oluceps
|
|
pokon548
|
|
luochen1990
|
|
];
|
|
platforms = lib.platforms.linux;
|
|
mainProgram = "dae";
|
|
};
|
|
})
|