Merge pull request #230615 from fbewivpjsbsby/fix-phantomsocks

This commit is contained in:
Sandro 2023-05-15 15:33:23 +02:00 committed by GitHub
commit 89d1baa08b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,11 @@
{ lib
, buildGoModule
, fetchFromGitHub
, stdenv
, libpcap
# Cann't be build with both pcap and rawsocket tags
, withPcap ? (!stdenv.isLinux && !withRawsocket)
, withRawsocket ? (stdenv.isLinux && !withPcap)
}:
buildGoModule rec {
@ -16,6 +21,13 @@ buildGoModule rec {
vendorHash = "sha256-c0NQfZuMMWz1ASwFBcpMNjxZwXLo++gMYBiNgvT8ZLQ=";
ldflags = [
"-s" "-w"
];
buildInputs = lib.optional withPcap libpcap;
tags = lib.optional withPcap "pcap"
++ lib.optional withRawsocket "rawsocket";
meta = with lib;{
homepage = "https://github.com/macronut/phantomsocks";
description = "A cross-platform proxy client/server for Linux/Windows/macOS";