various: remove code for macOS < 11 (#370995)
This commit is contained in:
@@ -95,10 +95,6 @@ stdenv.mkDerivation rec {
|
||||
install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
|
||||
'';
|
||||
|
||||
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
[
|
||||
"--with-boost-libdir=${boost.out}/lib"
|
||||
|
||||
@@ -92,10 +92,6 @@ stdenv.mkDerivation rec {
|
||||
install -Dm644 share/pixmaps/groestlcoin256.png $out/share/pixmaps/groestlcoin.png
|
||||
'';
|
||||
|
||||
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
[
|
||||
"--with-boost-libdir=${boost.out}/lib"
|
||||
|
||||
@@ -52,10 +52,6 @@ stdenv.mkDerivation rec {
|
||||
xdg-utils
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ];
|
||||
|
||||
preBuild = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
|
||||
export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -39,15 +39,10 @@ stdenv.mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch =
|
||||
lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
|
||||
substituteInPlace src/platfdep_mac.mm \
|
||||
--replace "appearance.name == NSAppearanceNameDarkAqua" "NO"
|
||||
''
|
||||
+ lib.optionalString (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isx86_64) ''
|
||||
substituteInPlace 3rd/CMakeLists.txt \
|
||||
--replace "-msse4.2 -maes" ""
|
||||
'';
|
||||
postPatch = lib.optionalString (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isx86_64) ''
|
||||
substituteInPlace 3rd/CMakeLists.txt \
|
||||
--replace "-msse4.2 -maes" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
|
||||
@@ -74,10 +74,6 @@ stdenv.mkDerivation rec {
|
||||
"-DUSE_PULSEAUDIO:BOOL=${if pulseSupport then "TRUE" else "FALSE"}"
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
|
||||
"-DAPPLE_OLD_XCODE"
|
||||
]);
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
|
||||
@@ -146,7 +146,6 @@ buildPythonApplication rec {
|
||||
mkdir ./fonts/
|
||||
cp "${nerd-fonts.symbols-only}/share/fonts/truetype/NerdFonts/Symbols/SymbolsNerdFontMono-Regular.ttf" ./fonts/
|
||||
|
||||
${ lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "export MACOSX_DEPLOYMENT_TARGET=11" }
|
||||
${if stdenv.hostPlatform.isDarwin then ''
|
||||
${python.pythonOnBuildForHost.interpreter} setup.py build ${darwinOptions}
|
||||
make docs
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
swift,
|
||||
swiftpm,
|
||||
swiftPackages,
|
||||
darwin,
|
||||
}:
|
||||
|
||||
# Use the same stdenv, including clang, as Swift itself
|
||||
@@ -26,18 +25,12 @@ swiftPackages.stdenv.mkDerivation (final: {
|
||||
swiftpm
|
||||
];
|
||||
|
||||
buildInputs = with darwin.apple_sdk.frameworks; [
|
||||
Foundation
|
||||
Cocoa
|
||||
];
|
||||
|
||||
makeFlags = [ "prefix=$(out)" ];
|
||||
|
||||
meta = {
|
||||
description = "Run a script whenever dark mode changes in macOS";
|
||||
homepage = "https://github.com/bouk/dark-mode-notify";
|
||||
# Doesn't build on x86_64 because of some CoreGraphics issue, even with SDK 11.0
|
||||
platforms = [ "aarch64-darwin" ];
|
||||
platforms = lib.platforms.darwin;
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ YorikSar ];
|
||||
mainProgram = "dark-mode-notify";
|
||||
|
||||
@@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"-DFLB_METRICS=ON"
|
||||
"-DFLB_HTTP_SERVER=ON"
|
||||
"-DFLB_OUT_PGSQL=ON"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" ];
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString (
|
||||
# Used by the embedded luajit, but is not predefined on older mac SDKs.
|
||||
|
||||
@@ -22,13 +22,6 @@ buildGoModule rec {
|
||||
vendorHash = null;
|
||||
subPackages = ".";
|
||||
|
||||
preBuild =
|
||||
lib.optionalString
|
||||
(stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0")
|
||||
''
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.15
|
||||
'';
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
AppKit
|
||||
CoreGraphics
|
||||
|
||||
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
# IP_DONTFRAG is defined on macOS from Big Sur
|
||||
postPatch = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
sed -i '10i#undef IP_DONTFRAG' include/junkie/proto/ip.h
|
||||
'';
|
||||
|
||||
|
||||
@@ -4,12 +4,8 @@
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
openpam,
|
||||
darwin,
|
||||
}:
|
||||
|
||||
let
|
||||
sdkOlderThan11 = lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pam_reattach";
|
||||
version = "1.3";
|
||||
@@ -24,9 +20,9 @@ stdenv.mkDerivation rec {
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
|
||||
"-DENABLE_CLI=ON"
|
||||
] ++ lib.optional sdkOlderThan11 "-DCMAKE_LIBRARY_PATH=${darwin.apple_sdk.sdk}/usr/lib";
|
||||
];
|
||||
|
||||
buildInputs = [ openpam ] ++ lib.optional sdkOlderThan11 darwin.apple_sdk.sdk;
|
||||
buildInputs = [ openpam ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
|
||||
@@ -69,6 +69,5 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin; # missing strtonum()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -83,12 +83,5 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ ehmry ];
|
||||
platforms = platforms.unix;
|
||||
|
||||
# TODO: Remove once nixpkgs uses newer SDKs that supports '*at' functions.
|
||||
# Probably MacOS SDK 10.13 or later. Check the current version in
|
||||
# ../../../../os-specific/darwin/apple-sdk/default.nix
|
||||
#
|
||||
# https://github.com/gittup/tup/commit/3697c74
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -45,11 +45,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./4.x-nix_share_path.patch
|
||||
];
|
||||
|
||||
# The 10.12 SDK used by x86_64-darwin requires defining `_POSIX_C_SOURCE` to use `strnlen`.
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString (
|
||||
stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64
|
||||
) "-D_POSIX_C_SOURCE=200809L";
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
|
||||
@@ -24,10 +24,6 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ gettext gnutls nettle libxcrypt ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ApplicationServices ];
|
||||
|
||||
preBuild = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
|
||||
export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
libidn,
|
||||
libedit,
|
||||
readline,
|
||||
apple_sdk,
|
||||
libGL,
|
||||
libGLU,
|
||||
libgbm,
|
||||
@@ -175,25 +174,6 @@ clangStdenv.mkDerivation (finalAttrs: {
|
||||
libedit
|
||||
readline
|
||||
]
|
||||
++
|
||||
lib.optional
|
||||
(
|
||||
clangStdenv.hostPlatform.isDarwin
|
||||
&& lib.versionOlder clangStdenv.hostPlatform.darwinSdkVersion "11.0"
|
||||
)
|
||||
(
|
||||
# this can likely be removed as:
|
||||
# "libproc.h is included in the 10.12 SDK Libsystem and should be identical to this one."
|
||||
# but the package is marked broken on darwin so unable to test
|
||||
|
||||
# Pull a header that contains a definition of proc_pid_rusage().
|
||||
# (We pick just that one because using the other headers from `sdk` is not
|
||||
# compatible with our C++ standard library. This header is already in
|
||||
# the standard library on aarch64)
|
||||
runCommand "webkitgtk_headers" { } ''
|
||||
install -Dm444 "${lib.getDev apple_sdk.sdk}"/include/libproc.h "$out"/include/libproc.h
|
||||
''
|
||||
)
|
||||
++ lib.optionals clangStdenv.hostPlatform.isLinux [
|
||||
libseccomp
|
||||
libmanette
|
||||
|
||||
@@ -131,14 +131,7 @@ buildPythonPackage rec {
|
||||
# Require deprecated distutils
|
||||
"test_which"
|
||||
"test_load"
|
||||
]
|
||||
++
|
||||
lib.optionals
|
||||
(stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13")
|
||||
[
|
||||
# Flaky with older low-res mtime on darwin < 10.13 (#143987)
|
||||
"test_second_load_timestamp"
|
||||
];
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "intake" ];
|
||||
|
||||
|
||||
@@ -103,7 +103,5 @@ buildPythonPackage rec {
|
||||
changelog = "https://github.com/UKPLab/sentence-transformers/releases/tag/v${version}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ dit7ya ];
|
||||
# Segmentation fault at import
|
||||
broken = stdenv.hostPlatform.system == "x86_64-darwin";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
diff -ru a/absl/base/config.h b/absl/base/config.h
|
||||
--- a/absl/base/config.h
|
||||
+++ b/absl/base/config.h
|
||||
@@ -558,9 +558,9 @@
|
||||
__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000) || \
|
||||
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \
|
||||
__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 120000))))
|
||||
-#define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1
|
||||
+// #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1
|
||||
#else
|
||||
-#define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0
|
||||
+// #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0
|
||||
#endif
|
||||
|
||||
// ABSL_HAVE_STD_ANY
|
||||
@@ -449,9 +449,6 @@ let
|
||||
rm -f .bazelversion
|
||||
patchShebangs .
|
||||
''
|
||||
+ lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") ''
|
||||
cat ${./com_google_absl_fix_macos.patch} >> third_party/absl/com_google_absl_fix_mac_and_nvcc_build.patch
|
||||
''
|
||||
+ lib.optionalString (!withTensorboard) ''
|
||||
# Tensorboard pulls in a bunch of dependencies, some of which may
|
||||
# include security vulnerabilities. So we make it optional.
|
||||
|
||||
@@ -275,14 +275,6 @@ buildPythonPackage rec {
|
||||
|
||||
patches =
|
||||
lib.optionals cudaSupport [ ./fix-cmake-cuda-toolkit.patch ]
|
||||
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
|
||||
# pthreadpool added support for Grand Central Dispatch in April
|
||||
# 2020. However, this relies on functionality (DISPATCH_APPLY_AUTO)
|
||||
# that is available starting with macOS 10.13. However, our current
|
||||
# base is 10.12. Until we upgrade, we can fall back on the older
|
||||
# pthread support.
|
||||
./pthreadpool-disable-gcd.diff
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
# Propagate CUPTI to Kineto by overriding the search path with environment variables.
|
||||
# https://github.com/pytorch/pytorch/pull/108847
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
diff --git a/third_party/pthreadpool/CMakeLists.txt b/third_party/pthreadpool/CMakeLists.txt
|
||||
index 0db3264..1ba91c4 100644
|
||||
--- a/third_party/pthreadpool/CMakeLists.txt
|
||||
+++ b/third_party/pthreadpool/CMakeLists.txt
|
||||
@@ -74,9 +74,7 @@ IF(EMSCRIPTEN)
|
||||
LIST(APPEND PTHREADPOOL_SRCS src/shim.c)
|
||||
ELSE()
|
||||
LIST(APPEND PTHREADPOOL_SRCS src/portable-api.c src/memory.c)
|
||||
- IF(APPLE AND (PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "default" OR PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "gcd"))
|
||||
- LIST(APPEND PTHREADPOOL_SRCS src/gcd.c)
|
||||
- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$" AND (PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "default" OR PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "event"))
|
||||
+ IF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$" AND (PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "default" OR PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "event"))
|
||||
LIST(APPEND PTHREADPOOL_SRCS src/windows.c)
|
||||
ELSE()
|
||||
LIST(APPEND PTHREADPOOL_SRCS src/pthreads.c)
|
||||
@@ -111,10 +109,6 @@ ELSEIF(PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "futex")
|
||||
TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_FUTEX=1)
|
||||
TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_GCD=0)
|
||||
TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_EVENT=0)
|
||||
-ELSEIF(PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "gcd")
|
||||
- TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_FUTEX=0)
|
||||
- TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_GCD=1)
|
||||
- TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_EVENT=0)
|
||||
ELSEIF(PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "event")
|
||||
TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_FUTEX=0)
|
||||
TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_GCD=0)
|
||||
diff --git a/third_party/pthreadpool/src/threadpool-common.h b/third_party/pthreadpool/src/threadpool-common.h
|
||||
index ca84744..244d0ca 100644
|
||||
--- a/third_party/pthreadpool/src/threadpool-common.h
|
||||
+++ b/third_party/pthreadpool/src/threadpool-common.h
|
||||
@@ -14,14 +14,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#ifndef PTHREADPOOL_USE_GCD
|
||||
- #if defined(__APPLE__)
|
||||
- #define PTHREADPOOL_USE_GCD 1
|
||||
- #else
|
||||
- #define PTHREADPOOL_USE_GCD 0
|
||||
- #endif
|
||||
-#endif
|
||||
-
|
||||
#ifndef PTHREADPOOL_USE_EVENT
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define PTHREADPOOL_USE_EVENT 1
|
||||
@@ -1,6 +1,5 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, darwin
|
||||
, fetchFromGitHub
|
||||
, libunwind
|
||||
, python3
|
||||
@@ -30,11 +29,6 @@ rustPlatform.buildRustPackage rec {
|
||||
python3
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
|
||||
# Pull a header that contains a definition of proc_pid_rusage().
|
||||
darwin.apple_sdk_11_0.Libsystem
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
|
||||
|
||||
checkFlags = [
|
||||
|
||||
@@ -10889,7 +10889,6 @@ with pkgs;
|
||||
harfbuzz = harfbuzzFull;
|
||||
libsoup = libsoup_2_4;
|
||||
inherit (gst_all_1) gst-plugins-base gst-plugins-bad;
|
||||
inherit (darwin) apple_sdk;
|
||||
};
|
||||
|
||||
webkitgtk_4_1 = webkitgtk_4_0.override {
|
||||
|
||||
Reference in New Issue
Block a user