Merge pull request #274540 from seanybaggins/add-mingw32-support-unbound
unbound: Add mingw32 support
This commit is contained in:
commit
5c28294b17
1 changed files with 9 additions and 4 deletions
|
@ -41,6 +41,8 @@
|
||||||
# enable support for python plugins in unbound: note this is distinct from pyunbound
|
# 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
|
# see https://unbound.docs.nlnetlabs.nl/en/latest/developer/python-modules.html
|
||||||
, withPythonModule ? false
|
, withPythonModule ? false
|
||||||
|
, withLto ? !stdenv.hostPlatform.isStatic && !stdenv.hostPlatform.isMinGW
|
||||||
|
, withMakeWrapper ? !stdenv.hostPlatform.isMinGW
|
||||||
, libnghttp2
|
, libnghttp2
|
||||||
|
|
||||||
# for passthru.tests
|
# for passthru.tests
|
||||||
|
@ -58,7 +60,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB
|
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 ];
|
++ lib.optionals withPythonModule [ swig ];
|
||||||
|
|
||||||
buildInputs = [ openssl nettle expat libevent ]
|
buildInputs = [ openssl nettle expat libevent ]
|
||||||
|
@ -78,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
"--with-rootkey-file=${dns-root-data}/root.key"
|
"--with-rootkey-file=${dns-root-data}/root.key"
|
||||||
"--enable-pie"
|
"--enable-pie"
|
||||||
"--enable-relro-now"
|
"--enable-relro-now"
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isStatic [
|
] ++ lib.optionals (!withLto) [
|
||||||
"--disable-flto"
|
"--disable-flto"
|
||||||
] ++ lib.optionals withSystemd [
|
] ++ lib.optionals withSystemd [
|
||||||
"--enable-systemd"
|
"--enable-systemd"
|
||||||
|
@ -124,9 +128,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
make unbound-event-install
|
make unbound-event-install
|
||||||
|
'' + lib.optionalString withMakeWrapper ''
|
||||||
wrapProgram $out/bin/unbound-control-setup \
|
wrapProgram $out/bin/unbound-control-setup \
|
||||||
--prefix PATH : ${lib.makeBinPath [ openssl ]}
|
--prefix PATH : ${lib.makeBinPath [ openssl ]}
|
||||||
'' + lib.optionalString withPythonModule ''
|
'' + lib.optionalString (withMakeWrapper && withPythonModule) ''
|
||||||
wrapProgram $out/bin/unbound \
|
wrapProgram $out/bin/unbound \
|
||||||
--prefix PYTHONPATH : "$out/${python.sitePackages}" \
|
--prefix PYTHONPATH : "$out/${python.sitePackages}" \
|
||||||
--argv0 $out/bin/unbound
|
--argv0 $out/bin/unbound
|
||||||
|
@ -161,6 +166,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
homepage = "https://www.unbound.net";
|
homepage = "https://www.unbound.net";
|
||||||
maintainers = lib.teams.helsinki-systems.members;
|
maintainers = lib.teams.helsinki-systems.members;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix ++ platforms.windows;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue