mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, libcap, libev, libconfig, perl, tcp_wrappers, pcre2, nixosTests }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "sslh";
|
|
version = "2.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "yrutschle";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-+G6xYiytSWW2CljuaeJZfTuXCjkbDCzwU/FSLBmvnGw=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|