at master 991 B view raw
1{ 2 lib, 3 stdenv, 4 qtModule, 5 qtbase, 6 qtmultimedia, 7}: 8 9qtModule { 10 pname = "qtlocation"; 11 propagatedBuildInputs = [ 12 qtbase 13 qtmultimedia 14 ]; 15 outputs = [ 16 "bin" 17 "out" 18 "dev" 19 ]; 20 # Clang 18 treats a non-const, narrowing conversion in an initializer list as an error, 21 # which results in a failure building a 3rd party dependency of qtlocation. Just suppress it. 22 env = 23 lib.optionalAttrs (stdenv.cc.isClang && (lib.versionAtLeast (lib.getVersion stdenv.cc) "18")) 24 { 25 NIX_CFLAGS_COMPILE = "-Wno-c++11-narrowing-const-reference"; 26 }; 27 qmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ 28 # boost uses std::auto_ptr which has been disabled in clang with libcxx 29 # This flag re-enables this feature 30 # https://libcxx.llvm.org/docs/UsingLibcxx.html#c-17-specific-configuration-macros 31 "QMAKE_CXXFLAGS+=-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" 32 "QMAKE_CXXFLAGS+=-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION" 33 ]; 34}