opensnitch: fix test version

This commit is contained in:
Mario Rodas 2023-10-08 04:20:00 +00:00
parent 0d767c96ab
commit 69ebb04365

View File

@ -27,6 +27,11 @@ buildGoModule rec {
hash = "sha256-C8Uuz2FC7Zu07ZmFpp+ejpNxkyC3/mM9J2dc5FUKx64=";
};
postPatch = ''
# Allow configuring Version at build time
substituteInPlace daemon/core/version.go --replace "const " "var "
'';
modRoot = "daemon";
buildInputs = [
@ -65,6 +70,8 @@ buildGoModule rec {
--replace "/bin/mkdir" "${coreutils}/bin/mkdir"
'';
ldflags = [ "-s" "-w" "-X github.com/evilsocket/opensnitch/daemon/core.Version=${version}" ];
postInstall = ''
wrapProgram $out/bin/opensnitchd \
--prefix PATH : ${lib.makeBinPath [ iptables ]}