nixpkgs/pkgs/servers/sslh/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.2 KiB
Nix
Raw Normal View History

2024-01-04 14:10:44 +03:00
{ lib, stdenv, fetchFromGitHub, libcap, libev, libconfig, perl, tcp_wrappers, pcre2, nixosTests }:
2015-02-05 02:36:27 +03:00
stdenv.mkDerivation rec {
pname = "sslh";
2024-05-17 05:53:26 +03:00
version = "2.1.2";
2015-02-05 02:36:27 +03:00
2021-09-20 10:15:03 +03:00
src = fetchFromGitHub {
owner = "yrutschle";
repo = pname;
rev = "v${version}";
2024-05-17 05:53:26 +03:00
hash = "sha256-+G6xYiytSWW2CljuaeJZfTuXCjkbDCzwU/FSLBmvnGw=";
2015-02-05 02:36:27 +03:00
};
postPatch = "patchShebangs *.sh";
2024-01-04 14:10:44 +03:00
buildInputs = [ libev libconfig perl pcre2 ] ++ lib.optionals stdenv.isLinux [ libcap tcp_wrappers ];
2015-02-05 02:36:27 +03:00
2024-01-04 14:10:44 +03:00
makeFlags = lib.optionals stdenv.isLinux [ "USELIBCAP=1" "USELIBWRAP=1" ];
2015-02-05 02:36:27 +03:00
2023-07-24 22:51:14 +03:00
postInstall = ''
# install all flavours
install -p sslh-fork "$out/sbin/sslh-fork"
install -p sslh-select "$out/sbin/sslh-select"
2023-07-28 00:41:08 +03:00
install -p sslh-ev "$out/sbin/sslh-ev"
2023-07-24 22:51:14 +03:00
ln -sf sslh-fork "$out/sbin/sslh"
'';
2018-11-22 15:38:16 +03:00
installFlags = [ "PREFIX=$(out)" ];
hardeningDisable = [ "format" ];
2015-02-05 02:36:27 +03:00
2020-01-18 15:00:00 +03:00
passthru.tests = {
inherit (nixosTests) sslh;
};
meta = with lib; {
2015-02-05 02:36:27 +03:00
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";
2016-05-13 01:01:57 +03:00
maintainers = with maintainers; [ koral fpletz ];
2015-02-05 02:36:27 +03:00
platforms = platforms.all;
};
}