phantomsocks: fix build tag

Co-Authored-By: Sandro <sandro.jaeckel@gmail.com>

+12
+12
pkgs/tools/networking/phantomsocks/default.nix
··· 1 { lib 2 , buildGoModule 3 , fetchFromGitHub 4 }: 5 6 buildGoModule rec { ··· 15 }; 16 17 vendorHash = "sha256-c0NQfZuMMWz1ASwFBcpMNjxZwXLo++gMYBiNgvT8ZLQ="; 18 19 meta = with lib;{ 20 homepage = "https://github.com/macronut/phantomsocks";
··· 1 { lib 2 , buildGoModule 3 , fetchFromGitHub 4 + , stdenv 5 + , libpcap 6 + # Cann't be build with both pcap and rawsocket tags 7 + , withPcap ? (!stdenv.isLinux && !withRawsocket) 8 + , withRawsocket ? (stdenv.isLinux && !withPcap) 9 }: 10 11 buildGoModule rec { ··· 20 }; 21 22 vendorHash = "sha256-c0NQfZuMMWz1ASwFBcpMNjxZwXLo++gMYBiNgvT8ZLQ="; 23 + 24 + ldflags = [ 25 + "-s" "-w" 26 + ]; 27 + buildInputs = lib.optional withPcap libpcap; 28 + tags = lib.optional withPcap "pcap" 29 + ++ lib.optional withRawsocket "rawsocket"; 30 31 meta = with lib;{ 32 homepage = "https://github.com/macronut/phantomsocks";