diff --git a/pkgs/development/libraries/libwebsockets/default.nix b/pkgs/development/libraries/libwebsockets/default.nix index ddafc9bc6594..ff6fdeb53838 100644 --- a/pkgs/development/libraries/libwebsockets/default.nix +++ b/pkgs/development/libraries/libwebsockets/default.nix @@ -17,7 +17,7 @@ let nativeBuildInputs = [ cmake ]; cmakeFlags = [ "-DLWS_WITH_PLUGINS=ON" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=unused-but-set-variable"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=unused-but-set-variable"; meta = with stdenv.lib; { description = "Light, portable C library for websockets";