diff options
author | Qyriad <qyriad@qyriad.me> | 2024-06-06 22:21:52 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@lix-systems> | 2024-06-06 22:21:52 +0000 |
commit | ec768df0046659e75974919f5923661a29ff52c9 (patch) | |
tree | 569c3b5a3158ae66d288059c8b8d9f6f271825da /package.nix | |
parent | 1659404626b80509db162fddcc1f5294fe590afa (diff) | |
parent | 766e718f6739e9098d18674bd71cb0f4bc5bbf43 (diff) |
Merge changes Ic4be41eb,I48db2385 into main
* changes:
devshells: only enable pch for clang
build: expose option to enable or disable precompiled std headers
Diffstat (limited to 'package.nix')
-rw-r--r-- | package.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/package.nix b/package.nix index a39ff4b2e..d38563eec 100644 --- a/package.nix +++ b/package.nix @@ -436,9 +436,14 @@ stdenv.mkDerivation (finalAttrs: { # For Meson to find Boost. env = finalAttrs.env; - # I guess this is necessary because mesonFlags to mkDerivation doesn't propagate in inputsFrom, - # which only propagates stuff set in hooks? idk. - inherit (finalAttrs) mesonFlags; + mesonFlags = + # I guess this is necessary because mesonFlags to mkDerivation doesn't propagate in inputsFrom, + # which only propagates stuff set in hooks? idk. + finalAttrs.mesonFlags + # Clangd breaks when GCC is using precompiled headers, so for the devshell specifically + # we make precompiled C++ stdlib conditional on using Clang. + # https://git.lix.systems/lix-project/lix/issues/374 + ++ [ (lib.mesonBool "enable-pch-std" stdenv.cc.isClang) ]; packages = lib.optional (stdenv.cc.isClang && hostPlatform == buildPlatform) clang-tools_llvm |