mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
knot-resolver: run more tests also on *-darwin
The tests need patching a bit, until the next release. These tests would e.g. discover that kresd didn't work at all until the patch in the parent commit.
This commit is contained in:
parent
6d2168c73c
commit
6ffee2b5d0
@ -1,4 +1,5 @@
|
||||
{ lib, stdenv, fetchurl
|
||||
, fetchpatch
|
||||
# native deps.
|
||||
, runCommand, pkg-config, meson, ninja, makeWrapper
|
||||
# build+runtime deps.
|
||||
@ -26,6 +27,19 @@ unwrapped = stdenv.mkDerivation rec {
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "fix-config-tests-on-darwin.patch";
|
||||
url = "https://gitlab.nic.cz/knot/knot-resolver/-/commit/48ad9d436cf80f58c107774c313a561d852148a0.diff";
|
||||
sha256 = "CEX1XkeYLUSe31xUhNdMRMl1VUXtKFCs5noNJaqL5x0=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "fix-config-tests-on-aarch64-darwin.patch";
|
||||
url = "https://gitlab.nic.cz/knot/knot-resolver/-/commit/adaac913c50a5db2f226a081ddc419b0d56d1757.diff";
|
||||
sha256 = "1LrL74luzPTyJ7VBi7fskDga4lYAh7cSUmDcd1BNO78=";
|
||||
})
|
||||
];
|
||||
|
||||
# Path fixups for the NixOS service.
|
||||
postPatch = ''
|
||||
patch meson.build <<EOF
|
||||
@ -74,7 +88,7 @@ unwrapped = stdenv.mkDerivation rec {
|
||||
"--default-library=static" # not used by anyone
|
||||
]
|
||||
++ optional doInstallCheck "-Dunit_tests=enabled"
|
||||
++ optional (doInstallCheck && !stdenv.isDarwin) "-Dconfig_tests=enabled"
|
||||
++ optional doInstallCheck "-Dconfig_tests=enabled"
|
||||
++ optional stdenv.isLinux "-Dsystemd_files=enabled" # used by NixOS service
|
||||
#"-Dextra_tests=enabled" # not suitable as in-distro tests; many deps, too.
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user