nixpkgs/pkgs/tools/networking/dae/default.nix

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

55 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, clang
, fetchFromGitHub
, buildGoModule
}:
buildGoModule rec {
pname = "dae";
2023-09-02 16:18:34 +00:00
version = "0.3.0";
src = fetchFromGitHub {
owner = "daeuniverse";
repo = "dae";
rev = "v${version}";
2023-09-02 16:18:34 +00:00
hash = "sha256-WiJqhXYehuUCLEuVbsQkmTntuH1srtePtZgYBSTbxiw=";
fetchSubmodules = true;
};
2023-09-02 16:18:34 +00:00
vendorHash = "sha256-fb4PEMhV8+5zaRJyl+nYi2BHcOUDUVAwxce2xaRt5JA=";
proxyVendor = true;
2023-09-02 16:18:34 +00:00
nativeBuildInputs = [ clang ];
ldflags = [
"-s"
"-w"
"-X github.com/daeuniverse/dae/cmd.Version=${version}"
"-X github.com/daeuniverse/dae/common/consts.MaxMatchSetLen_=64"
];
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 \
ebpf
'';
# 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
'';
meta = with lib; {
description = "A Linux high-performance transparent proxy solution based on eBPF";
homepage = "https://github.com/daeuniverse/dae";
license = licenses.agpl3Only;
2023-08-07 06:33:33 +00:00
maintainers = with maintainers; [ oluceps pokon548 ];
platforms = platforms.linux;
2023-08-07 06:33:33 +00:00
mainProgram = "dae";
};
}