From f0f097ceb8d145f408416eb3d3152275f6a53bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Sat, 17 Sep 2022 02:24:21 +0200 Subject: [PATCH] tracebox: add version test --- pkgs/tools/networking/tracebox/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/networking/tracebox/default.nix b/pkgs/tools/networking/tracebox/default.nix index 3c3277e2bc7d..33bb443e3710 100644 --- a/pkgs/tools/networking/tracebox/default.nix +++ b/pkgs/tools/networking/tracebox/default.nix @@ -5,6 +5,8 @@ , libpcap , lua5_1 , json_c +, testers +, tracebox }: stdenv.mkDerivation rec { pname = "tracebox"; @@ -25,6 +27,11 @@ stdenv.mkDerivation rec { json_c ]; + postPatch = '' + sed -i configure.ac \ + -e 's,$(git describe .*),${version},' + ''; + configureFlags = [ "--with-lua=yes" "--with-libpcap=yes" @@ -35,6 +42,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru.tests.version = testers.testVersion { + package = tracebox; + command = "tracebox -V"; + }; + meta = with lib; { homepage = "http://www.tracebox.org/"; description = "A middlebox detection tool";