Skip to content

Commit

Permalink
dnsperf: add musl fix
Browse files Browse the repository at this point in the history
  • Loading branch information
poopsicles committed Jan 4, 2025
1 parent fd152bc commit b9d4e2a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pkgs/by-name/dn/dnsperf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
stdenv,
autoreconfHook,
fetchFromGitHub,
fetchpatch,
ldns,
libck,
nghttp2,
Expand Down Expand Up @@ -33,6 +34,25 @@ stdenv.mkDerivation rec {
openssl
];

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

# configureFlags = [ "CFLAGS=-U_GNU_SOURCE" ];

# env = {
# NIX_CFLAGS_COMPILE = toString [
# "-U_GNU_SOURCE"
# "-DGNU_SOURCE -UGNU_SOURCE"
# ];
# };

doCheck = true;

meta = with lib; {
Expand Down

0 comments on commit b9d4e2a

Please sign in to comment.