diff options
author | Artturin <Artturin@artturin.com> | 2023-02-19 21:23:32 +0200 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2023-02-22 21:23:04 +0200 |
commit | f9fdf2d4028eac28a074c9ad75d309b3dcbf8e7a (patch) | |
tree | 01a46081dd6fc9d0a4c68be1c1844a8764bd8461 /pkgs/development/interpreters | |
parent | 6f6cc4a22db345c66bcb69c26469b0140ca3be44 (diff) |
treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
Diffstat (limited to 'pkgs/development/interpreters')
13 files changed, 13 insertions, 13 deletions
diff --git a/pkgs/development/interpreters/clisp/default.nix b/pkgs/development/interpreters/clisp/default.nix index 0cf336cffdf9..bdd15fd4fcc1 100644 --- a/pkgs/development/interpreters/clisp/default.nix +++ b/pkgs/development/interpreters/clisp/default.nix @@ -91,7 +91,7 @@ stdenv.mkDerivation rec { (''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full'' + lib.concatMapStrings (x: " " + x) withModules); - NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}"; + env.NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}"; # TODO : make mod-check fails doCheck = false; diff --git a/pkgs/development/interpreters/clisp/hg.nix b/pkgs/development/interpreters/clisp/hg.nix index d37f2fbe1e1c..8ad72842dc78 100644 --- a/pkgs/development/interpreters/clisp/hg.nix +++ b/pkgs/development/interpreters/clisp/hg.nix @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { (''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full'' + lib.concatMapStrings (x: " " + x) withModules); - NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}"; + env.NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}"; # TODO : make mod-check fails doCheck = false; diff --git a/pkgs/development/interpreters/falcon/default.nix b/pkgs/development/interpreters/falcon/default.nix index 40c05113ecff..f7f5a54f415f 100644 --- a/pkgs/development/interpreters/falcon/default.nix +++ b/pkgs/development/interpreters/falcon/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { # -Wnarrowing is enabled by default in recent GCC versions, # causing compilation to fail. - NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ pcre zlib sqlite ]; diff --git a/pkgs/development/interpreters/gnu-apl/default.nix b/pkgs/development/interpreters/gnu-apl/default.nix index e413914aa39c..883f3df647ef 100644 --- a/pkgs/development/interpreters/gnu-apl/default.nix +++ b/pkgs/development/interpreters/gnu-apl/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ readline gettext ncurses ]; - NIX_CFLAGS_COMPILE = with lib; toString ((optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = with lib; toString ((optionals stdenv.cc.isGNU [ # Needed with GCC 8 "-Wno-error=int-in-bool-context" "-Wno-error=class-memaccess" diff --git a/pkgs/development/interpreters/io/default.nix b/pkgs/development/interpreters/io/default.nix index 0777fb8d48ba..8a6de1f094d2 100644 --- a/pkgs/development/interpreters/io/default.nix +++ b/pkgs/development/interpreters/io/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation { ''; # for gcc5; c11 inline semantics breaks the build - NIX_CFLAGS_COMPILE = "-fgnu89-inline"; + env.NIX_CFLAGS_COMPILE = "-fgnu89-inline"; meta = with lib; { description = "Io programming language"; diff --git a/pkgs/development/interpreters/kerf/default.nix b/pkgs/development/interpreters/kerf/default.nix index d904a1ede386..e4fbc2bc6558 100644 --- a/pkgs/development/interpreters/kerf/default.nix +++ b/pkgs/development/interpreters/kerf/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { makeFlags = [ "kerf" "kerf_test" ]; # avoid a huge amount of warnings to make failures clearer - NIX_CFLAGS_COMPILE = map (x: "-Wno-${x}") [ + env.NIX_CFLAGS_COMPILE = map (x: "-Wno-${x}") [ "void-pointer-to-int-cast" "format" "implicit-function-declaration" diff --git a/pkgs/development/interpreters/love/0.10.nix b/pkgs/development/interpreters/love/0.10.nix index 881bc59ccff2..53c7b5e9435e 100644 --- a/pkgs/development/interpreters/love/0.10.nix +++ b/pkgs/development/interpreters/love/0.10.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { "--with-lua=luajit" ]; - NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 + env.NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 meta = { homepage = "https://love2d.org"; diff --git a/pkgs/development/interpreters/love/11.nix b/pkgs/development/interpreters/love/11.nix index bb8f88379fad..768625e08cfa 100644 --- a/pkgs/development/interpreters/love/11.nix +++ b/pkgs/development/interpreters/love/11.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { "--with-lua=luajit" ]; - NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 + env.NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 meta = { homepage = "https://love2d.org"; diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index 8596e379e710..ddb49b40ff64 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -100,7 +100,7 @@ stdenv.mkDerivation rec { "HOST_CC=${buildStdenv.cc}/bin/cc" ] ++ lib.optional enableJITDebugModule "INSTALL_LJLIBD=$(INSTALL_LMOD)"; enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = XCFLAGS; + env.NIX_CFLAGS_COMPILE = toString XCFLAGS; postInstall = '' ( cd "$out/include"; ln -s luajit-*/* . ) diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 2971981eba1f..4278f71ea0dd 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -256,7 +256,7 @@ in with passthru; stdenv.mkDerivation ({ LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2" + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2" + lib.optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"; DETERMINISTIC_BUILD = 1; diff --git a/pkgs/development/interpreters/renpy/default.nix b/pkgs/development/interpreters/renpy/default.nix index d5505009a070..d9105ca29238 100644 --- a/pkgs/development/interpreters/renpy/default.nix +++ b/pkgs/development/interpreters/renpy/default.nix @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { runHook postInstall ''; - NIX_CFLAGS_COMPILE = with python3.pkgs; "-I${pygame_sdl2}/include/${python.libPrefix}"; + env.NIX_CFLAGS_COMPILE = with python3.pkgs; "-I${pygame_sdl2}/include/${python.libPrefix}"; meta = with lib; { description = "Visual Novel Engine"; diff --git a/pkgs/development/interpreters/spidermonkey/common.nix b/pkgs/development/interpreters/spidermonkey/common.nix index a4310b8f206f..a6b0282ce5c1 100644 --- a/pkgs/development/interpreters/spidermonkey/common.nix +++ b/pkgs/development/interpreters/spidermonkey/common.nix @@ -134,7 +134,7 @@ stdenv.mkDerivation (finalAttrs: rec { # cc-rs insists on using -mabi=lp64 (soft-float) for riscv64, # while we have a double-float toolchain - NIX_CFLAGS_COMPILE = lib.optionalString (with stdenv.hostPlatform; isRiscV && is64bit && lib.versionOlder version "91") "-mabi=lp64d"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (with stdenv.hostPlatform; isRiscV && is64bit && lib.versionOlder version "91") "-mabi=lp64d"; # https://github.com/NixOS/nixpkgs/issues/201254 NIX_LDFLAGS = if (with stdenv; isAarch64 && isLinux) then [ "-lgcc" ] else null; diff --git a/pkgs/development/interpreters/unicon-lang/default.nix b/pkgs/development/interpreters/unicon-lang/default.nix index 593a955c798b..bca8ef1d159c 100644 --- a/pkgs/development/interpreters/unicon-lang/default.nix +++ b/pkgs/development/interpreters/unicon-lang/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { # ld: ../common/ipp.o:(.bss+0x0): multiple definition of `lpath'; tglobals.o:(.bss+0x30): first defined here # TODO: remove the workaround once upstream releases version past: # https://sourceforge.net/p/unicon/unicon/ci/b1a65230233f3825d055aee913b4fdcf178a0eaf/ - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; configurePhase = '' case "$(uname -a | sed 's/ /_/g')" in |