proxytunnel/nix/proxytunnel.nix
2025-04-04 10:18:32 -07:00

31 lines
524 B
Nix

{
gnu-system ? true,
set-proc-title ? true,
pkgs,
}: let
optflags = "-DUSE_SSL ${
if gnu-system
then "-DHAVE_GETOPT_LONG"
else ""
} ${
if set-proc-title
then "-DSETPROCTITLE -DSPT_TYPE=2"
else ""
}";
in
pkgs.stdenv.mkDerivation {
pname = "proxytunnel";
version = "1.12.3";
src = ./..;
buildInputs = [pkgs.openssl];
buildPhase = ''
make OPTFLAGS="${optflags}"
'';
installPhase = ''
mkdir -p $out/bin
cp ./proxytunnel $out/bin
'';
}