diff options
author | John Ericson <git@JohnEricson.me> | 2024-01-12 21:03:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 21:03:14 -0500 |
commit | 5c28294b17afbf101574ba16f74ac83947dd55d1 (patch) | |
tree | f640e1682d138aae89ec75b496665649e04a2605 | |
parent | d66a1bfb84217b97ec5c14ca195a531b78314026 (diff) | |
parent | d81076b0c3226b26d36c6cd671ba789f89a1dc72 (diff) |
Merge pull request #274540 from seanybaggins/add-mingw32-support-unbound
unbound: Add mingw32 support
-rw-r--r-- | pkgs/tools/networking/unbound/default.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index d71353658e56e..d2e657e4e13f6 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -41,6 +41,8 @@ # enable support for python plugins in unbound: note this is distinct from pyunbound # see https://unbound.docs.nlnetlabs.nl/en/latest/developer/python-modules.html , withPythonModule ? false +, withLto ? !stdenv.hostPlatform.isStatic && !stdenv.hostPlatform.isMinGW +, withMakeWrapper ? !stdenv.hostPlatform.isMinGW , libnghttp2 # for passthru.tests @@ -58,7 +60,9 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB - nativeBuildInputs = [ makeWrapper pkg-config ] + nativeBuildInputs = + lib.optionals withMakeWrapper [ makeWrapper ] + ++ [ pkg-config ] ++ lib.optionals withPythonModule [ swig ]; buildInputs = [ openssl nettle expat libevent ] @@ -78,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: { "--with-rootkey-file=${dns-root-data}/root.key" "--enable-pie" "--enable-relro-now" - ] ++ lib.optionals stdenv.hostPlatform.isStatic [ + ] ++ lib.optionals (!withLto) [ "--disable-flto" ] ++ lib.optionals withSystemd [ "--enable-systemd" @@ -124,9 +128,10 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' make unbound-event-install + '' + lib.optionalString withMakeWrapper '' wrapProgram $out/bin/unbound-control-setup \ --prefix PATH : ${lib.makeBinPath [ openssl ]} - '' + lib.optionalString withPythonModule '' + '' + lib.optionalString (withMakeWrapper && withPythonModule) '' wrapProgram $out/bin/unbound \ --prefix PYTHONPATH : "$out/${python.sitePackages}" \ --argv0 $out/bin/unbound @@ -161,6 +166,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.bsd3; homepage = "https://www.unbound.net"; maintainers = lib.teams.helsinki-systems.members; - platforms = platforms.unix; + platforms = platforms.unix ++ platforms.windows; }; }) |