Merge pull request #214210 from obsidiansystems/stunnel-improvements

This commit is contained in:
Artturi 2023-02-03 00:06:07 +02:00 committed by GitHub
commit 58843af787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,15 @@
{ lib, stdenv, fetchurl, openssl, nixosTests }:
{ lib, stdenv, fetchurl, openssl
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "stunnel";
version = "5.67";
outputs = [ "out" "doc" "man" ];
src = fetchurl {
url = "https://www.stunnel.org/archive/${lib.versions.major version}.x/${pname}-${version}.tar.gz";
sha256 = "3086939ee6407516c59b0ba3fbf555338f9d52f459bcab6337c0f00e91ea8456";
@ -11,11 +17,19 @@ stdenv.mkDerivation rec {
# not the output of `nix-prefetch-url`
};
buildInputs = [ openssl ];
enableParallelBuilding = true;
buildInputs = [
openssl
] ++ lib.optionals systemdSupport [
systemd
];
configureFlags = [
"--with-ssl=${openssl.dev}"
"--sysconfdir=/etc"
"--localstatedir=/var"
(lib.enableFeature systemdSupport "systemd")
];
postInstall = ''