From 2cdddaa5e2e6504fc1e97a40eaa1f30768e64f78 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 6 May 2023 13:53:29 +0200 Subject: [PATCH] llvmPackages_16: Fix an evaluation error from setting NIX_CFLAGS_COMPILE This code is backported from nixos-unstable (2c627d9c7022) and isn't fully compatible with NixOS 22.11 due to other missing abstractions/changes. I simply went with the exact same code as the other llvmPackages already use here. This fixes the following error: ``` error: cannot coerce a set to a string at pkgs/development/compilers/llvm/16/compiler-rt/default.nix:34:3: 33| 34| env.NIX_CFLAGS_COMPILE = toString [ | ^ 35| "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ``` --- pkgs/development/compilers/llvm/16/compiler-rt/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/16/compiler-rt/default.nix b/pkgs/development/compilers/llvm/16/compiler-rt/default.nix index 3666f291c321..d608d66f40db 100644 --- a/pkgs/development/compilers/llvm/16/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/16/compiler-rt/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - env.NIX_CFLAGS_COMPILE = toString [ + NIX_CFLAGS_COMPILE = [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ];