Skip to content

Commit b6a1d9c

Browse files
dnsperf: add musl fix (NixOS#370881)
2 parents 4e1c04d + df13bea commit b6a1d9c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pkgs/by-name/dn/dnsperf/package.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
stdenv,
44
autoreconfHook,
55
fetchFromGitHub,
6+
fetchpatch,
67
ldns,
78
libck,
89
nghttp2,
@@ -33,6 +34,16 @@ stdenv.mkDerivation rec {
3334
openssl
3435
];
3536

37+
patches = lib.optionals stdenv.hostPlatform.isMusl [
38+
# dnsperf doesn't have support for musl (https://github.com/DNS-OARC/dnsperf/issues/265)
39+
# and strerror_r returns int on non-glibc: https://github.com/NixOS/nixpkgs/issues/370498
40+
# TODO: remove if better non-glibc detection is ever upstreamed
41+
(fetchpatch {
42+
url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/5bd92b8f86a0bf15dddf8fa180adf14344d6cc15/testing/dnsperf/musl-perf_strerror_r.patch";
43+
hash = "sha256-yTJHXkti/xSklmVfAV45lEsOiHy7oL1phImNTNtcPkM=";
44+
})
45+
];
46+
3647
doCheck = true;
3748

3849
meta = with lib; {

0 commit comments

Comments
 (0)