about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers
diff options
context:
space:
mode:
authorLéo Gaspard <leo@gaspard.io>2018-05-24 19:00:40 +0200
committerLéo Gaspard <leo@gaspard.io>2018-05-24 20:00:35 +0200
commit0e84af17727a8355920057e81cb12bf3f6ee7a2e (patch)
tree07a008fd9388f9af3ad282b6bf38878d188da216 /pkgs/applications/networking/instant-messengers
parent291808359b354ee6931e7cf8cb1eaa295458e0d0 (diff)
downloadnixlib-0e84af17727a8355920057e81cb12bf3f6ee7a2e.tar
nixlib-0e84af17727a8355920057e81cb12bf3f6ee7a2e.tar.gz
nixlib-0e84af17727a8355920057e81cb12bf3f6ee7a2e.tar.bz2
nixlib-0e84af17727a8355920057e81cb12bf3f6ee7a2e.tar.lz
nixlib-0e84af17727a8355920057e81cb12bf3f6ee7a2e.tar.xz
nixlib-0e84af17727a8355920057e81cb12bf3f6ee7a2e.tar.zst
nixlib-0e84af17727a8355920057e81cb12bf3f6ee7a2e.zip
nheko: make darwin build fail later
Diffstat (limited to 'pkgs/applications/networking/instant-messengers')
-rw-r--r--pkgs/applications/networking/instant-messengers/nheko/default.nix23
1 files changed, 21 insertions, 2 deletions
diff --git a/pkgs/applications/networking/instant-messengers/nheko/default.nix b/pkgs/applications/networking/instant-messengers/nheko/default.nix
index 4d002a4a7531..d3c0a6f8eca2 100644
--- a/pkgs/applications/networking/instant-messengers/nheko/default.nix
+++ b/pkgs/applications/networking/instant-messengers/nheko/default.nix
@@ -1,4 +1,7 @@
-{ stdenv, fetchFromGitHub, fetchurl, cmake, doxygen, lmdb, qt5 }:
+{
+  lib, stdenv, fetchFromGitHub, fetchurl,
+  cmake, doxygen, lmdb, qt5, qtmacextras
+}:
 
 let
   json_hpp = fetchurl {
@@ -60,6 +63,22 @@ stdenv.mkDerivation rec {
   # a dependency is updated, so that the fetches up there can be updated too
   patches = [ ./external-deps.patch ];
 
+  # If, on Darwin, you encounter the error
+  #   error: must specify at least one argument for '...' parameter of variadic
+  #   macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
+  # Then adding this parameter is likely the fix you want.
+  #
+  # However, it looks like either cmake doesn't honor this CFLAGS variable, or
+  # darwin's compiler doesn't have the same syntax as gcc for turning off
+  # -Werror selectively.
+  #
+  # Anyway, this is something that will have to be debugged with access to a
+  # darwin-based OS. Sorry about that!
+  #
+  #preConfigure = lib.optionalString stdenv.isDarwin ''
+  #  export CFLAGS=-Wno-error=gnu-zero-variadic-macro-arguments
+  #'';
+
   cmakeFlags = [
     "-DMATRIX_STRUCTS_LIBRARY=${matrix-structs}/lib/static/libmatrix_structs.a"
     "-DMATRIX_STRUCTS_INCLUDE_DIR=${matrix-structs}/include/matrix_structs"
@@ -71,7 +90,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     lmdb lmdbxx matrix-structs qt5.qtbase qt5.qtmultimedia qt5.qttools tweeny
-  ];
+  ] ++ lib.optional stdenv.isDarwin qtmacextras;
 
   enableParallelBuilding = true;