Files
nixpkgs/pkgs/by-name/st/stunnel/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

72 lines
1.5 KiB
Nix

{
fetchurl,
lib,
nixosTests,
openssl,
stdenv,
systemd,
systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd,
mimalloc,
mimallocSupport ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "stunnel";
version = "5.75";
outputs = [
"out"
"doc"
"man"
];
src = fetchurl {
url = "https://www.stunnel.org/archive/${lib.versions.major finalAttrs.version}.x/stunnel-${finalAttrs.version}.tar.gz";
hash = "sha256-DB7w7YUkCXTcy5T+dPuS1jg0dMfA0Q6HltH3gaO6VoM=";
# please use the contents of "https://www.stunnel.org/downloads/stunnel-${version}.tar.gz.sha256",
# not the output of `nix-prefetch-url`
};
enableParallelBuilding = true;
buildInputs = [
openssl
]
++ lib.optionals systemdSupport [
systemd
]
++ lib.optionals mimallocSupport [
mimalloc
];
configureFlags = [
"--with-ssl=${openssl.dev}"
"--sysconfdir=/etc"
"--localstatedir=/var"
(lib.enableFeature systemdSupport "systemd")
];
postInstall = ''
# remove legacy compatibility-wrapper that would require perl
rm $out/bin/stunnel3
'';
installFlags = [
"sysconfdir=\${out}/etc"
"localstatedir=\${TMPDIR}"
];
passthru.tests = {
stunnel = nixosTests.stunnel;
};
meta = {
description = "Universal tls/ssl wrapper";
homepage = "https://www.stunnel.org/";
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.thoughtpolice ];
platforms = lib.platforms.unix;
mainProgram = "stunnel";
};
})