From 8fa14075fbcf6495f48adf5db9bcdad9d3f9679d Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Wed, 10 May 2023 12:06:13 -0400 Subject: [PATCH] indent: fix build with clang 13 or newer --- pkgs/development/tools/misc/indent/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/indent/default.nix b/pkgs/development/tools/misc/indent/default.nix index 1e5aebb76f83..a94a907c1024 100644 --- a/pkgs/development/tools/misc/indent/default.nix +++ b/pkgs/development/tools/misc/indent/default.nix @@ -16,8 +16,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ texinfo ]; pkgsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang - "-Wno-implicit-function-declaration"; + env.NIX_CFLAGS_COMPILE = toString ( + lib.optional stdenv.cc.isClang "-Wno-implicit-function-declaration" + ++ lib.optional (stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc) "13") "-Wno-unused-but-set-variable" + ); hardeningDisable = [ "format" ];