diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index a360058725006..42d7021f3452b 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -92,6 +92,16 @@ let passAsFile = [ "extraConfig" ]; + # Workaround '-idirafter' ordering bug in staging-next: + # https://github.com/NixOS/nixpkgs/pull/210004 + # where libc '-idirafter' gets added after user's idirafter and + # breaks. + # TODO(trofi): remove it in staging once fixed in cc-wrapper. + preConfigure = '' + export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] buildPackages.stdenv.hostPlatform.config}=$(< ${buildPackages.stdenv.cc}/nix-support/libc-cflags) + export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] stdenv.hostPlatform.config}=$(< ${stdenv.cc}/nix-support/libc-cflags) + ''; + configurePhase = '' runHook preConfigure