treewide: remove obsolete TARGET_OS_* workarounds (#371310)

This commit is contained in:
Emily
2025-01-06 14:56:24 +00:00
committed by GitHub
14 changed files with 1 additions and 53 deletions
@@ -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/
@@ -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 [
@@ -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 [
@@ -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 = ''
-3
View File
@@ -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;
-6
View File
@@ -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";
+1 -3
View File
@@ -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 = [
-7
View File
@@ -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";
-3
View File
@@ -37,9 +37,6 @@ stdenv.mkDerivation rec {
];
propagatedBuildInputs = [ perlPackages.LWP ];
# Fixes build failures on Darwin. These should be defined in `TargetConditional.h`, but its 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
-5
View File
@@ -33,11 +33,6 @@ stdenv.mkDerivation (finalAttrs: {
ln -s $out/bin/jwhois $out/bin/whois
'';
# Work around error from <stdio.h> 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 = {
-4
View File
@@ -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";
-4
View File
@@ -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; {
-4
View File
@@ -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";
-3
View File
@@ -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 ];