nixpkgs/pkgs/tools/networking/stunnel/default.nix

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

62 lines
1.4 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
}:
2023-08-06 17:29:32 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "stunnel";
2024-02-06 05:55:27 +00:00
version = "5.72";
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-02-06 05:55:27 +00:00
hash = "sha256-PVMpQSga41MxlzUUTkrbmuSJoQt+MJxYpIFX8I9C6Uk=";
# 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
];
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
})