diff options
author | Will Dietz <w@wdtz.org> | 2016-09-06 13:44:46 -0500 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-02-13 09:44:52 -0600 |
commit | 4a605161b37c010175a441b6ac0829ff1738aed2 (patch) | |
tree | 8f273b749255f23c7dc5ac671b0d5930d1c13865 /pkgs/tools/networking/iperf | |
parent | ab92d028f6210f737517ffe56c7ff0a75f2ce0fe (diff) |
iperf: Fix build with musl.
Diffstat (limited to 'pkgs/tools/networking/iperf')
-rw-r--r-- | pkgs/tools/networking/iperf/3.nix | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/tools/networking/iperf/3.nix b/pkgs/tools/networking/iperf/3.nix index d69b52a50014a..b9e47ecd7f904 100644 --- a/pkgs/tools/networking/iperf/3.nix +++ b/pkgs/tools/networking/iperf/3.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl }: +{ stdenv, fetchurl, openssl, fetchpatch }: stdenv.mkDerivation rec { name = "iperf-3.3"; @@ -10,6 +10,23 @@ stdenv.mkDerivation rec { buildInputs = [ openssl ]; + preConfigure = stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + NIX_CFLAGS_COMPILE+=" -D_GNU_SOURCE" + ''; + + patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + (fetchpatch { + url = "http://git.alpinelinux.org/cgit/aports/plain/main/iperf3/build-fixes.patch"; + name = "fix-musl-build.patch"; + sha256 = "0zvfjnqdldh6rc6qggyb310swdnl9qk0m3z1kklnqzgjsh8dskvl"; + }) + (fetchpatch { + url = "http://git.alpinelinux.org/cgit/aports/plain/main/iperf3/remove-pg-flags.patch"; + name = "remove-pg-flags.patch"; + sha256 = "0lnczhass24kgq59drgdipnhjnw4l1cy6gqza7f2ah1qr4q104rm"; + }) +]; + postInstall = '' ln -s iperf3 $out/bin/iperf ''; |