nixpkgs/pkgs/by-name/da/dae/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.4 KiB
Nix
Raw Normal View History

{
lib,
clang,
fetchFromGitHub,
buildGoModule,
nixosTests,
2024-10-06 10:59:02 +00:00
nix-update-script,
}:
buildGoModule rec {
pname = "dae";
version = "0.8.0";
src = fetchFromGitHub {
owner = "daeuniverse";
repo = "dae";
rev = "v${version}";
hash = "sha256-Vdh5acE5i/bJ8VXOm+9OqZQbxvqv4TS/t0DDfBs/K5g=";
fetchSubmodules = true;
};
vendorHash = "sha256-0Q+1cXUu4EH4qkGlK6BIpv4dCdtSKjb1RbLi5Xfjcew=";
proxyVendor = true;
nativeBuildInputs = [ clang ];
hardeningDisable = [
"zerocallusedregs"
];
buildPhase = ''
runHook preBuild
2023-09-02 16:18:34 +00:00
make CFLAGS="-D__REMOVE_BPF_PRINTK -fno-stack-protector -Wno-unused-command-line-argument" \
NOSTRIP=y \
VERSION=${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 /usr/bin/dae $out/bin/dae
'';
passthru.tests = {
inherit (nixosTests) dae;
};
2024-10-06 10:59:02 +00:00
passthru.updateScript = nix-update-script { };
2024-09-28 00:22:32 +00:00
meta = with lib; {
description = "Linux high-performance transparent proxy solution based on eBPF";
homepage = "https://github.com/daeuniverse/dae";
license = licenses.agpl3Only;
maintainers = with maintainers; [
oluceps
pokon548
2024-09-28 00:24:50 +00:00
luochen1990
];
platforms = platforms.linux;
2023-08-07 06:33:33 +00:00
mainProgram = "dae";
};
}