Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
70 lines
1.3 KiB
Nix
70 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
libcap,
|
|
libev,
|
|
libconfig,
|
|
perl,
|
|
tcp_wrappers,
|
|
pcre2,
|
|
nixosTests,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "sslh";
|
|
version = "2.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "yrutschle";
|
|
repo = "sslh";
|
|
rev = "v${version}";
|
|
hash = "sha256-qGOOqEe9wlR3pXmYEwMQTxuMcNLLX2i/39AIAb6I4jU=";
|
|
};
|
|
|
|
postPatch = "patchShebangs *.sh";
|
|
|
|
buildInputs = [
|
|
libev
|
|
libconfig
|
|
perl
|
|
pcre2
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
libcap
|
|
tcp_wrappers
|
|
];
|
|
|
|
makeFlags = lib.optionals stdenv.hostPlatform.isLinux [
|
|
"USELIBCAP=1"
|
|
"USELIBWRAP=1"
|
|
];
|
|
|
|
postInstall = ''
|
|
# install all flavours
|
|
install -p sslh-fork "$out/sbin/sslh-fork"
|
|
install -p sslh-select "$out/sbin/sslh-select"
|
|
install -p sslh-ev "$out/sbin/sslh-ev"
|
|
ln -sf sslh-fork "$out/sbin/sslh"
|
|
'';
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests) sslh;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port)";
|
|
license = licenses.gpl2Plus;
|
|
homepage = "https://www.rutschle.net/tech/sslh/README.html";
|
|
maintainers = with maintainers; [
|
|
koral
|
|
fpletz
|
|
];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|