about summary refs log tree commit diff
path: root/pkgs/development/embedded
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2023-02-19 21:23:32 +0200
committerArtturin <Artturin@artturin.com>2023-02-22 21:23:04 +0200
commitf9fdf2d4028eac28a074c9ad75d309b3dcbf8e7a (patch)
tree01a46081dd6fc9d0a4c68be1c1844a8764bd8461 /pkgs/development/embedded
parent6f6cc4a22db345c66bcb69c26469b0140ca3be44 (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/embedded')
-rw-r--r--pkgs/development/embedded/bossa/default.nix2
-rw-r--r--pkgs/development/embedded/openocd/default.nix2
-rw-r--r--pkgs/development/embedded/stm8/stm8flash/default.nix2
-rw-r--r--pkgs/development/embedded/uisp/default.nix2
4 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/embedded/bossa/default.nix b/pkgs/development/embedded/bossa/default.nix
index f3d6cd6a6d89c..f53e49edaed4a 100644
--- a/pkgs/development/embedded/bossa/default.nix
+++ b/pkgs/development/embedded/bossa/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
 
   # Explicitly specify targets so they don't get stripped.
   makeFlags = [ "bin/bossac" "bin/bossash" "bin/bossa" ];
-  NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
 
   installPhase = ''
     mkdir -p $out/bin
diff --git a/pkgs/development/embedded/openocd/default.nix b/pkgs/development/embedded/openocd/default.nix
index 5ffb9071534b1..cbc905cee73da 100644
--- a/pkgs/development/embedded/openocd/default.nix
+++ b/pkgs/development/embedded/openocd/default.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
     "--enable-remote-bitbang"
   ];
 
-  NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
+  env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
     "-Wno-error=cpp"
     "-Wno-error=strict-prototypes" # fixes build failure with hidapi 0.10.0
   ];
diff --git a/pkgs/development/embedded/stm8/stm8flash/default.nix b/pkgs/development/embedded/stm8/stm8flash/default.nix
index eaf1a19c91bcc..1584ee7fdf073 100644
--- a/pkgs/development/embedded/stm8/stm8flash/default.nix
+++ b/pkgs/development/embedded/stm8/stm8flash/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   # NOTE: _FORTIFY_SOURCE requires compiling with optimization (-O)
-  NIX_CFLAGS_COMPILE = "-O";
+  env.NIX_CFLAGS_COMPILE = "-O";
 
   preBuild = ''
     export DESTDIR=$out;
diff --git a/pkgs/development/embedded/uisp/default.nix b/pkgs/development/embedded/uisp/default.nix
index 986a560ff6e8b..0ae31bc24fb2e 100644
--- a/pkgs/development/embedded/uisp/default.nix
+++ b/pkgs/development/embedded/uisp/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1bncxp5yxh9r1yrp04vvhfiva8livi1pwic7v8xj99q09zrwahvw";
   };
 
-  NIX_CFLAGS_COMPILE = "-Wno-error";
+  env.NIX_CFLAGS_COMPILE = "-Wno-error";
 
   meta = {
     description = "Tool for AVR microcontrollers which can interface to many hardware in-system programmers";