Merge pull request #144762 from lovesegfault/unbound-tests

unbound: enable tests
This commit is contained in:
Bernardo Meurer 2021-11-05 11:17:50 -07:00 committed by GitHub
commit 37956a5534
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,8 @@
, pkg-config
, makeWrapper
, symlinkJoin
, bison
, nixosTests
#
# By default unbound will not be built with systemd support. Unbound is a very
# commmon dependency. The transitive dependency closure of systemd also
@ -91,6 +93,10 @@ stdenv.mkDerivation rec {
sed -E '/CONFCMDLINE/ s;${storeDir}/[a-z0-9]{32}-;${storeDir}/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-;g' -i config.h
'';
checkInputs = [ bison ];
doCheck = true;
installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf" ];
postInstall = ''
@ -107,6 +113,7 @@ stdenv.mkDerivation rec {
configureFlags="$configureFlags --with-nettle=${nettle.dev} --with-libunbound-only"
configurePhase
buildPhase
checkPhase
installPhase
''
# get rid of runtime dependencies on $dev outputs
@ -115,6 +122,8 @@ stdenv.mkDerivation rec {
(pkg: lib.optionalString (pkg ? dev) " --replace '-L${pkg.dev}/lib' '-L${pkg.out}/lib' --replace '-R${pkg.dev}/lib' '-R${pkg.out}/lib'")
(builtins.filter (p: p != null) buildInputs);
passthru.tests = nixosTests.unbound;
meta = with lib; {
description = "Validating, recursive, and caching DNS resolver";
license = licenses.bsd3;