nixpkgs/pkgs/by-name/st/stunnel/package.nix

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

66 lines
1.5 KiB
Nix
Raw Normal View History

2023-08-06 17:29:32 +00:00
{
fetchurl
, lib
, nixosTests
2023-08-06 17:29:32 +00:00
, openssl
, stdenv
, systemd
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
2024-11-02 15:28:10 +00:00
, mimalloc
, mimallocSupport ? false
}:
2023-08-06 17:29:32 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "stunnel";
2024-10-14 04:06:48 +00:00
version = "5.73";
outputs = [ "out" "doc" "man" ];
src = fetchurl {
2023-08-06 17:29:32 +00:00
url = "https://www.stunnel.org/archive/${lib.versions.major finalAttrs.version}.x/stunnel-${finalAttrs.version}.tar.gz";
2024-10-14 04:06:48 +00:00
hash = "sha256-vJF8O82UOk1jI2DAZ5d6MeheOF9fSEX2l0m86IGDyzg=";
# please use the contents of "https://www.stunnel.org/downloads/stunnel-${version}.tar.gz.sha256",
2018-02-01 00:00:00 +00:00
# not the output of `nix-prefetch-url`
};
enableParallelBuilding = true;
buildInputs = [
openssl
] ++ lib.optionals systemdSupport [
systemd
2024-11-02 15:28:10 +00:00
] ++ lib.optionals mimallocSupport [
mimalloc
];
2015-04-22 21:47:09 +00:00
configureFlags = [
"--with-ssl=${openssl.dev}"
2015-04-22 21:47:09 +00:00
"--sysconfdir=/etc"
"--localstatedir=/var"
(lib.enableFeature systemdSupport "systemd")
2015-04-22 21:47:09 +00:00
];
2018-12-14 08:19:39 +00:00
postInstall = ''
# remove legacy compatibility-wrapper that would require perl
rm $out/bin/stunnel3
'';
2015-04-22 21:47:09 +00:00
installFlags = [
"sysconfdir=\${out}/etc"
"localstatedir=\${TMPDIR}"
];
2022-02-22 22:08:43 +00:00
passthru.tests = {
stunnel = nixosTests.stunnel;
};
meta = {
description = "Universal tls/ssl wrapper";
2023-08-06 17:29:32 +00:00
homepage = "https://www.stunnel.org/";
license = lib.licenses.gpl2Plus;
2021-01-15 09:19:50 +00:00
maintainers = [ lib.maintainers.thoughtpolice ];
2023-08-06 17:29:32 +00:00
platforms = lib.platforms.unix;
2024-02-11 02:19:15 +00:00
mainProgram = "stunnel";
};
2023-08-06 17:29:32 +00:00
})