Merge pull request #259860 from marsam/opensnitch-buildGo121Module

opensnitch: use buildGo121Module
This commit is contained in:
Jonas Heinrich 2023-10-10 10:51:54 +02:00 committed by GitHub
commit f9d065801f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

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 ]}

View file

@ -11494,9 +11494,7 @@ with pkgs;
openfortivpn = callPackage ../tools/networking/openfortivpn { };
opensnitch = callPackage ../tools/networking/opensnitch/daemon.nix {
# Build currently fails on Go > 1.18
# See https://github.com/evilsocket/opensnitch/issues/851
buildGoModule = buildGo118Module;
buildGoModule = buildGo121Module;
};
opensnitch-ui = libsForQt5.callPackage ../tools/networking/opensnitch/ui.nix { };