diff --git a/pkgs/applications/audio/grandorgue/default.nix b/pkgs/applications/audio/grandorgue/default.nix index 674486a23adb..ab333f83ed53 100644 --- a/pkgs/applications/audio/grandorgue/default.nix +++ b/pkgs/applications/audio/grandorgue/default.nix @@ -47,8 +47,6 @@ stdenv.mkDerivation rec { "-DINSTALL_DEPEND=OFF" ] ++ lib.optional (!includeDemo) "-DINSTALL_DEMO=OFF"; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_IPHONE=0"; - postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin,lib} mv $out/GrandOrgue.app $out/Applications/ diff --git a/pkgs/applications/networking/remote/freerdp/3.nix b/pkgs/applications/networking/remote/freerdp/3.nix index 26c0567c666e..c40db22191e1 100644 --- a/pkgs/applications/networking/remote/freerdp/3.nix +++ b/pkgs/applications/networking/remote/freerdp/3.nix @@ -197,8 +197,6 @@ stdenv.mkDerivation (finalAttrs: { env.NIX_CFLAGS_COMPILE = toString ( lib.optionals stdenv.hostPlatform.isDarwin [ - "-DTARGET_OS_IPHONE=0" - "-DTARGET_OS_WATCH=0" "-include AudioToolbox/AudioToolbox.h" ] ++ lib.optionals stdenv.cc.isClang [ diff --git a/pkgs/applications/networking/remote/freerdp/default.nix b/pkgs/applications/networking/remote/freerdp/default.nix index e586c0e89c27..923aeea8db2f 100644 --- a/pkgs/applications/networking/remote/freerdp/default.nix +++ b/pkgs/applications/networking/remote/freerdp/default.nix @@ -217,8 +217,6 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = toString ( lib.optionals stdenv.hostPlatform.isDarwin [ - "-DTARGET_OS_IPHONE=0" - "-DTARGET_OS_WATCH=0" "-include AudioToolbox/AudioToolbox.h" ] ++ lib.optionals stdenv.cc.isClang [ diff --git a/pkgs/applications/networking/remote/remmina/default.nix b/pkgs/applications/networking/remote/remmina/default.nix index ba512da0c6aa..394bccb19fe1 100644 --- a/pkgs/applications/networking/remote/remmina/default.nix +++ b/pkgs/applications/networking/remote/remmina/default.nix @@ -125,11 +125,6 @@ stdenv.mkDerivation (finalAttrs: { "-DWITH_ICON_CACHE=OFF" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ - "-DTARGET_OS_IPHONE=0" - "-DTARGET_OS_WATCH=0" - ]); - dontWrapQtApps = true; preFixup = '' diff --git a/pkgs/by-name/al/alac/package.nix b/pkgs/by-name/al/alac/package.nix index 5aaedfe3c454..e46b5443477c 100644 --- a/pkgs/by-name/al/alac/package.nix +++ b/pkgs/by-name/al/alac/package.nix @@ -26,9 +26,6 @@ stdenv.mkDerivation (finalAttrs: { autoreconfHook ]; - # error: 'TARGET_OS_MAC' is not defined, evaluates to 0 - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_MAC"; - passthru = { updateScript = unstableGitUpdater { }; tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; diff --git a/pkgs/by-name/cd/cdo/package.nix b/pkgs/by-name/cd/cdo/package.nix index 886aa98be83d..6fb2fb68abe7 100644 --- a/pkgs/by-name/cd/cdo/package.nix +++ b/pkgs/by-name/cd/cdo/package.nix @@ -42,12 +42,6 @@ stdenv.mkDerivation rec { ++ lib.optional enable_all_static "--enable-all-static" ++ lib.optional enable_cxx "--enable-cxx"; - # address error: 'TARGET_OS_MACCATALYST' is not defined, - # evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] - # we don't want to appear to be a catalyst build; - # we are a TARGET_OS_MAC - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_MACCATALYST=0"; - meta = with lib; { description = "Collection of command line Operators to manipulate and analyse Climate and NWP model Data"; mainProgram = "cdo"; diff --git a/pkgs/by-name/fl/fluent-bit/package.nix b/pkgs/by-name/fl/fluent-bit/package.nix index 0a924cda634e..155acdbe28a4 100644 --- a/pkgs/by-name/fl/fluent-bit/package.nix +++ b/pkgs/by-name/fl/fluent-bit/package.nix @@ -52,11 +52,9 @@ stdenv.mkDerivation (finalAttrs: { ]; env.NIX_CFLAGS_COMPILE = toString ( - # Used by the embedded luajit, but is not predefined on older mac SDKs. - lib.optionals stdenv.hostPlatform.isDarwin [ "-DTARGET_OS_IPHONE=0" ] # Assumes GNU version of strerror_r, and the posix version has an # incompatible return type. - ++ lib.optionals (!stdenv.hostPlatform.isGnu) [ "-Wno-int-conversion" ] + lib.optionals (!stdenv.hostPlatform.isGnu) [ "-Wno-int-conversion" ] ); outputs = [ diff --git a/pkgs/by-name/gt/gtk-frdp/package.nix b/pkgs/by-name/gt/gtk-frdp/package.nix index 94d558c9ff7b..b2956f1926aa 100644 --- a/pkgs/by-name/gt/gtk-frdp/package.nix +++ b/pkgs/by-name/gt/gtk-frdp/package.nix @@ -48,13 +48,6 @@ stdenv.mkDerivation rec { }; }; - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals stdenv.hostPlatform.isDarwin [ - "-DTARGET_OS_IPHONE=0" - "-DTARGET_OS_WATCH=0" - ] - ); - meta = with lib; { homepage = "https://gitlab.gnome.org/GNOME/gtk-frdp"; description = "RDP viewer widget for GTK"; diff --git a/pkgs/by-name/ic/icoutils/package.nix b/pkgs/by-name/ic/icoutils/package.nix index 399ff1cc6234..e85ef53206a8 100644 --- a/pkgs/by-name/ic/icoutils/package.nix +++ b/pkgs/by-name/ic/icoutils/package.nix @@ -37,9 +37,6 @@ stdenv.mkDerivation rec { ]; propagatedBuildInputs = [ perlPackages.LWP ]; - # Fixes build failures on Darwin. These should be defined in `TargetConditional.h`, but it’s failing anyway. - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_IPHONE=0 -DTARGET_OS_EMBEDDED=0"; - postPatch = '' patchShebangs extresso/extresso patchShebangs extresso/extresso.in diff --git a/pkgs/by-name/jw/jwhois/package.nix b/pkgs/by-name/jw/jwhois/package.nix index 78f2398b2876..a4f0de644ef2 100644 --- a/pkgs/by-name/jw/jwhois/package.nix +++ b/pkgs/by-name/jw/jwhois/package.nix @@ -33,11 +33,6 @@ stdenv.mkDerivation (finalAttrs: { ln -s $out/bin/jwhois $out/bin/whois ''; - # Work around error from on aarch64-darwin: - # error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] - # TODO: this should probably be fixed at a lower level than this? - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-undef-prefix"; - env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-liconv"; meta = { diff --git a/pkgs/by-name/li/libtomcrypt/package.nix b/pkgs/by-name/li/libtomcrypt/package.nix index b44b19cc53cf..f2a74bba838b 100644 --- a/pkgs/by-name/li/libtomcrypt/package.nix +++ b/pkgs/by-name/li/libtomcrypt/package.nix @@ -16,10 +16,6 @@ stdenv.mkDerivation rec { sha256 = "113vfrgapyv72lalhd3nkw7jnks8az0gcb5wqn9hj19nhcxlrbcn"; }; - # Fixes a build failure on aarch64-darwin. Define for all Darwin targets for when x86_64-darwin - # upgrades to a newer SDK. - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DTARGET_OS_IPHONE=0"; - patches = [ (fetchpatch { name = "CVE-2019-17362.patch"; diff --git a/pkgs/by-name/li/libtommath/package.nix b/pkgs/by-name/li/libtommath/package.nix index cfc07912e46d..296617e1ee38 100644 --- a/pkgs/by-name/li/libtommath/package.nix +++ b/pkgs/by-name/li/libtommath/package.nix @@ -29,10 +29,6 @@ stdenv.mkDerivation rec { makefile = "makefile.shared"; - env.NIX_CFLAGS_COMPILE = lib.optionalString ( - stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 - ) "-DTARGET_OS_IPHONE=0"; - enableParallelBuilding = true; meta = with lib; { diff --git a/pkgs/by-name/my/mynewt-newt/package.nix b/pkgs/by-name/my/mynewt-newt/package.nix index 524c27ad29e0..fcaf7d410fc4 100644 --- a/pkgs/by-name/my/mynewt-newt/package.nix +++ b/pkgs/by-name/my/mynewt-newt/package.nix @@ -19,10 +19,6 @@ buildGoModule rec { doCheck = false; - # CGO_ENABLED=0 required for mac - "error: 'TARGET_OS_MAC' is not defined, evaluates to 0" - # https://github.com/shirou/gopsutil/issues/976 - env.CGO_ENABLED = if stdenv.hostPlatform.isLinux then 1 else 0; - meta = with lib; { homepage = "https://mynewt.apache.org/"; description = "Build and package management tool for embedded development"; diff --git a/pkgs/tools/system/gotop/default.nix b/pkgs/tools/system/gotop/default.nix index 0adbb2c4faf9..3c220cf9fd05 100644 --- a/pkgs/tools/system/gotop/default.nix +++ b/pkgs/tools/system/gotop/default.nix @@ -32,9 +32,6 @@ buildGoModule rec { "-X main.Version=v${version}" ]; - # prevent `error: 'TARGET_OS_MAC' is not defined` - env.CGO_CFLAGS = "-Wno-undef-prefix"; - nativeBuildInputs = [ installShellFiles ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ];