From 4bfb57a6cd742e6547c76967f851430fdc81676f Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Thu, 12 Feb 2026 11:16:31 +0100 Subject: [PATCH] bluespec: move env variable(s) into env for structuredAttrs --- pkgs/by-name/bl/bluespec/package.nix | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/bl/bluespec/package.nix b/pkgs/by-name/bl/bluespec/package.nix index d5d1ac88333a..53dbfc6655a6 100644 --- a/pkgs/by-name/bl/bluespec/package.nix +++ b/pkgs/by-name/bl/bluespec/package.nix @@ -177,12 +177,17 @@ stdenv.mkDerivation rec { cctools ]; - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals (stdenv.cc.isClang) [ - # wide_data.cxx:1750:15: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] - "-Wno-error" - ] - ); + env = + lib.optionalAttrs (stdenv.cc.isClang) { + NIX_CFLAGS_COMPILE = toString [ + # wide_data.cxx:1750:15: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] + "-Wno-error" + ]; + } + // lib.optionalAttrs (withSuiteCheck && stdenv.hostPlatform.isLinux) { + # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) + LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; + }; makeFlags = [ "NO_DEPS_CHECKS=1" # skip the subrepo check (this deriviation uses yices-src instead of the subrepo) @@ -235,11 +240,6 @@ stdenv.mkDerivation rec { checkTarget = if withSuiteCheck then "checkparallel" else "check-smoke"; # this is the shortest check but "check-suite" tests much more - # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) - LOCALE_ARCHIVE = lib.optionalString ( - withSuiteCheck && stdenv.hostPlatform.isLinux - ) "${glibcLocales}/lib/locale/locale-archive"; - nativeCheckInputs = [ gmp-static iverilog