From b4d31d66efecdc166edeb59208a5619e13ff68f5 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 30 Apr 2025 08:24:02 +0200 Subject: [PATCH] cc-wrapper: autofix code style Issue introduced in https://github.com/NixOS/nixpkgs/pull/389028 --- pkgs/build-support/cc-wrapper/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 3cc35a946164..8101394088fd 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -745,9 +745,17 @@ stdenvNoCC.mkDerivation { # no `/usr/include`, there’s essentially no risk to dropping # the flag there. See discussion in NixOS/nixpkgs#191152. # - + optionalString ((cc.isClang or false) && !(cc.isROCm or false) && !targetPlatform.isDarwin && !targetPlatform.isAndroid) '' - echo " -nostdlibinc" >> $out/nix-support/cc-cflags - '' + + + optionalString + ( + (cc.isClang or false) + && !(cc.isROCm or false) + && !targetPlatform.isDarwin + && !targetPlatform.isAndroid + ) + '' + echo " -nostdlibinc" >> $out/nix-support/cc-cflags + '' ## ## Man page and info support