about summary refs log tree commit diff
path: root/pkgs/tools/networking/dae/default.nix
diff options
context:
space:
mode:
authoroluceps <i@oluceps.uk>2024-06-16 17:13:18 +0000
committeroluceps <i@oluceps.uk>2024-06-18 16:49:19 +0000
commita2f07442f70e2748b641c015e202ec51d4d42c61 (patch)
treea4504780a8e5ebc72b492528d322d44daee26719 /pkgs/tools/networking/dae/default.nix
parent2815c3a421f4cb2e20ac629e2642125207b71a33 (diff)
dae: add missing subcommand `trace`
This will build the `trace` command which dae added
few months ago. See <https://github.com/daeuniverse/dae/pull/435>
for detail.

Co-authored-by: Aleksana <me@aleksana.moe>
Diffstat (limited to 'pkgs/tools/networking/dae/default.nix')
-rw-r--r--pkgs/tools/networking/dae/default.nix28
1 files changed, 15 insertions, 13 deletions
diff --git a/pkgs/tools/networking/dae/default.nix b/pkgs/tools/networking/dae/default.nix
index 89f961c473922..2f8f4236837a3 100644
--- a/pkgs/tools/networking/dae/default.nix
+++ b/pkgs/tools/networking/dae/default.nix
@@ -1,7 +1,8 @@
-{ lib
-, clang
-, fetchFromGitHub
-, buildGoModule
+{
+  lib,
+  clang,
+  fetchFromGitHub,
+  buildGoModule,
 }:
 buildGoModule rec {
   pname = "dae";
@@ -21,17 +22,15 @@ buildGoModule rec {
 
   nativeBuildInputs = [ clang ];
 
-  ldflags = [
-    "-s"
-    "-w"
-    "-X github.com/daeuniverse/dae/cmd.Version=${version}"
-    "-X github.com/daeuniverse/dae/common/consts.MaxMatchSetLen_=64"
-  ];
+  buildPhase = ''
+    runHook preBuild
 
-  preBuild = ''
     make CFLAGS="-D__REMOVE_BPF_PRINTK -fno-stack-protector -Wno-unused-command-line-argument" \
     NOSTRIP=y \
-    ebpf
+    VERSION=${version} \
+    OUTPUT=$out/bin/dae
+
+    runHook postBuild
   '';
 
   # network required
@@ -47,7 +46,10 @@ buildGoModule rec {
     description = "Linux high-performance transparent proxy solution based on eBPF";
     homepage = "https://github.com/daeuniverse/dae";
     license = licenses.agpl3Only;
-    maintainers = with maintainers; [ oluceps pokon548 ];
+    maintainers = with maintainers; [
+      oluceps
+      pokon548
+    ];
     platforms = platforms.linux;
     mainProgram = "dae";
   };