From cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Mon, 6 Feb 2023 21:49:02 +0100 Subject: treewide: use optionalString --- pkgs/development/compilers/gcc/11/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkgs/development/compilers/gcc/11/default.nix') diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index 1c6b7326c07..4b91e059830 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -195,10 +195,10 @@ stdenv.mkDerivation ({ --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname" '' + ( - if targetPlatform != hostPlatform || stdenv.cc.libc != null then + lib.optionalString (targetPlatform != hostPlatform || stdenv.cc.libc != null) # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. - let + (let libc = if libcCross != null then libcCross else stdenv.cc.libc; in ( @@ -216,8 +216,8 @@ stdenv.mkDerivation ({ '' sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR' '' - ) - else "") + )) + ) + lib.optionalString targetPlatform.isAvr '' makeFlagsArray+=( '-s' # workaround for hitting hydra log limit -- cgit 1.4.1