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/os-specific/darwin/apple-source-releases | |
parent | 6f6cc4a22db345c66bcb69c26469b0140ca3be44 (diff) | |
download | nixpkgs-f9fdf2d4028eac28a074c9ad75d309b3dcbf8e7a.tar nixpkgs-f9fdf2d4028eac28a074c9ad75d309b3dcbf8e7a.tar.gz nixpkgs-f9fdf2d4028eac28a074c9ad75d309b3dcbf8e7a.tar.bz2 nixpkgs-f9fdf2d4028eac28a074c9ad75d309b3dcbf8e7a.tar.lz nixpkgs-f9fdf2d4028eac28a074c9ad75d309b3dcbf8e7a.tar.xz nixpkgs-f9fdf2d4028eac28a074c9ad75d309b3dcbf8e7a.tar.zst nixpkgs-f9fdf2d4028eac28a074c9ad75d309b3dcbf8e7a.zip |
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/os-specific/darwin/apple-source-releases')
9 files changed, 10 insertions, 10 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix index f1b5e19feb2..984910b34c9 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix @@ -7,7 +7,7 @@ appleDerivation { xcbuildFlags = [ "-target" "Security_frameworks_osx" ]; - # NIX_CFLAGS_COMPILE = "-Wno-error -I${xnu}/include/libkern -DPRIVATE -I${xnu}/Library/Frameworks/System.framework/Headers"; + # env.NIX_CFLAGS_COMPILE = "-Wno-error -I${xnu}/include/libkern -DPRIVATE -I${xnu}/Library/Frameworks/System.framework/Headers"; preBuild = '' dtrace -h -C -s OSX/libsecurity_utilities/lib/security_utilities.d -o OSX/libsecurity_utilities/lib/utilities_dtrace.h diff --git a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix index 18233cfc522..23a5ae00671 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix @@ -18,7 +18,7 @@ appleDerivation { # Workaround build failure on -fno-common toolchains: # duplicate symbol '_btype_2' in:args.o pr_comment.o - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; # temporary install phase until xcodebuild has "install" support installPhase = '' diff --git a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix index ec252dca41c..30d123ab804 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix @@ -8,7 +8,7 @@ in appleDerivation { nativeBuildInputs = [ xcbuildHook ]; buildInputs = [ libutil ]; - NIX_CFLAGS_COMPILE = "-I."; + env.NIX_CFLAGS_COMPILE = "-I."; NIX_LDFLAGS = "-lutil"; patchPhase = '' # ugly hacks for missing headers diff --git a/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix b/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix index 6678f1f5b25..3b51022d59b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix @@ -6,7 +6,7 @@ appleDerivation { buildInputs = [ CoreSymbolication apple_sdk.frameworks.CoreSymbolication darling xnu ]; # -fcommon: workaround build failure on -fno-common toolchains: # duplicate symbol '_kCSRegionMachHeaderName' in: libproc.o dt_module_apple.o - NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers -Wno-error=implicit-function-declaration -fcommon"; + env.NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers -Wno-error=implicit-function-declaration -fcommon"; NIX_LDFLAGS = "-L./Products/Release"; xcbuildFlags = [ "-target" "dtrace_frameworks" "-target" "dtrace" ]; diff --git a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix index cfa66d2c353..8d44cc86194 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix @@ -19,7 +19,7 @@ appleDerivation { # Workaround build failure on -fno-common toolchains: # duplicate symbol '_chdname' in: ar_io.o tty_subs.o - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; # temporary install phase until xcodebuild has "install" support installPhase = '' diff --git a/pkgs/os-specific/darwin/apple-source-releases/network_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/network_cmds/default.nix index 9a95eb04e6e..367c0f50d03 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/network_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/network_cmds/default.nix @@ -7,7 +7,7 @@ appleDerivation { # Work around error from <stdio.h> on aarch64-darwin: # error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] - NIX_CFLAGS_COMPILE = "-Wno-error=undef-prefix -I./unbound -I${xnu}/Library/Frameworks/System.framework/Headers/"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=undef-prefix -I./unbound -I${xnu}/Library/Frameworks/System.framework/Headers/"; # "spray" requires some files that aren't compiling correctly in xcbuild. # "rtadvd" seems to fail with some missing constants. diff --git a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix index e4f2fa49ee0..16ebb2e7188 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix @@ -9,10 +9,10 @@ appleDerivation { buildInputs = [ libutil Librpcsvc apple_sdk.frameworks.OpenDirectory pam CF apple_sdk.frameworks.IOKit openbsm ]; - # NIX_CFLAGS_COMPILE = lib.optionalString hostPlatform.isi686 "-D__i386__" + # env.NIX_CFLAGS_COMPILE = lib.optionalString hostPlatform.isi686 "-D__i386__" # + lib.optionalString hostPlatform.isx86_64 "-D__x86_64__" # + lib.optionalString hostPlatform.isAarch32 "-D__arm__"; - NIX_CFLAGS_COMPILE = toString [ "-DDAEMON_UID=1" + env.NIX_CFLAGS_COMPILE = toString [ "-DDAEMON_UID=1" "-DDAEMON_GID=1" "-DDEFAULT_AT_QUEUE='a'" "-DDEFAULT_BATCH_QUEUE='b'" diff --git a/pkgs/os-specific/darwin/apple-source-releases/top/default.nix b/pkgs/os-specific/darwin/apple-source-releases/top/default.nix index ef766f7bd7f..2a47de021dc 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/top/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/top/default.nix @@ -5,7 +5,7 @@ appleDerivation { buildInputs = [ apple_sdk.frameworks.IOKit ncurses libutil ]; # Workaround build failure on -fno-common toolchains: # duplicate symbol '_tsamp' in: main.o top.o - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS = "-lutil"; installPhase = '' install -D Products/Release/libtop.a $out/lib/libtop.a diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index 266c2ef4dfe..262cb3d6a38 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -75,7 +75,7 @@ appleDerivation' (if headersOnly then stdenvNoCC else stdenv) ( ARCHS = arch; ARCH_CONFIGS = arch; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; preBuild = let macosVersion = "10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11" + |