about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-09-21 06:23:06 -0500
committerGitHub <noreply@github.com>2020-09-21 06:23:06 -0500
commit5df60eda72bd1314c2bf5067d85a3cebed3f7f66 (patch)
treeaf03f88f4536bc804c73f3a04ff70df03e33a9ed
parentf6ee70d3ea246270fd568691a99a7648823a789d (diff)
parentbf71f459d208c3ef46ac6c186113c929b3aab77e (diff)
Merge pull request #98360 from r-burns/liboping
liboping: fix build on Darwin
-rw-r--r--pkgs/development/libraries/liboping/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/libraries/liboping/default.nix b/pkgs/development/libraries/liboping/default.nix
index 1b2d83b84d0a3..956538b762409 100644
--- a/pkgs/development/libraries/liboping/default.nix
+++ b/pkgs/development/libraries/liboping/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses ? null, perl ? null }:
+{ stdenv, fetchurl, ncurses ? null, perl ? null, lib }:
 
 stdenv.mkDerivation rec {
   name = "liboping-1.10.0";
@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "1n2wkmvw6n80ybdwkjq8ka43z2x8mvxq49byv61b52iyz69slf7b";
   };
 
-  NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation";
+  NIX_CFLAGS_COMPILE = lib.optionalString
+    stdenv.cc.isGNU "-Wno-error=format-truncation";
 
   buildInputs = [ ncurses perl ];