diff options
author | Nick Cao <nickcao@nichi.co> | 2023-04-02 20:32:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-02 20:32:21 +0800 |
commit | dcd639c61127df8cafde0d62288bbb5afe4a9353 (patch) | |
tree | f694ab07d8b9d65694373918a54944a09b8284ab | |
parent | 8c7ec6b6bd4ba0c4dcfae580456f10f3f336275f (diff) | |
parent | 405977f9064aab729d10ed950a52c024d8aeae28 (diff) |
Merge pull request #223389 from oluceps/add-dae
dae: init at 0.1.5
-rw-r--r-- | pkgs/tools/networking/dae/default.nix | 47 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/tools/networking/dae/default.nix b/pkgs/tools/networking/dae/default.nix new file mode 100644 index 0000000000000..cf193b73c76a5 --- /dev/null +++ b/pkgs/tools/networking/dae/default.nix @@ -0,0 +1,47 @@ +{ lib +, clang +, fetchFromGitHub +, buildGoModule +}: +buildGoModule rec { + pname = "dae"; + version = "0.1.5"; + + src = fetchFromGitHub { + owner = "daeuniverse"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-EoStRmyYOtvG5ejtvHWNe9IIeE77hqp1OXBhRdxCYHs="; + fetchSubmodules = true; + }; + + vendorHash = "sha256-vxHufE3538l6zIcozFcrNhl+2sG1PtzkVxC0NyL3WMU="; + + proxyVendor = true; + + nativeBuildInputs = [ clang ]; + + ldflags = [ + "-s" + "-w" + "-X github.com/daeuniverse/dae/cmd.Version=${version}" + "-X github.com/daeuniverse/dae/common/consts.MaxMatchSetLen_=64" + ]; + + preBuild = '' + make CFLAGS="-D__REMOVE_BPF_PRINTK -fno-stack-protector" \ + NOSTRIP=y \ + ebpf + ''; + + # network required + doCheck = false; + + meta = with lib; { + description = "A Linux high-performance transparent proxy solution based on eBPF"; + homepage = "https://github.com/daeuniverse/dae"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ oluceps ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9ef805808f63..61947c4afdf02 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -492,6 +492,8 @@ with pkgs; cryptowatch-desktop = callPackage ../applications/finance/cryptowatch { }; + dae = callPackage ../tools/networking/dae { }; + databricks-sql-cli = python3Packages.callPackage ../applications/misc/databricks-sql-cli { }; dhallDirectoryToNix = callPackage ../build-support/dhall/directory-to-nix.nix { }; |