phantomsocks: fix build tag

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

+12
+12
pkgs/tools/networking/phantomsocks/default.nix
··· 1 1 { lib 2 2 , buildGoModule 3 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) 4 9 }: 5 10 6 11 buildGoModule rec { ··· 15 20 }; 16 21 17 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"; 18 30 19 31 meta = with lib;{ 20 32 homepage = "https://github.com/macronut/phantomsocks";