diff --git a/pkgs/applications/blockchains/bitcoin/default.nix b/pkgs/applications/blockchains/bitcoin/default.nix index 03f518cbab92..43f72f4bba1c 100644 --- a/pkgs/applications/blockchains/bitcoin/default.nix +++ b/pkgs/applications/blockchains/bitcoin/default.nix @@ -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" diff --git a/pkgs/applications/blockchains/groestlcoin/default.nix b/pkgs/applications/blockchains/groestlcoin/default.nix index 2922a0472312..d0de5fa729b3 100644 --- a/pkgs/applications/blockchains/groestlcoin/default.nix +++ b/pkgs/applications/blockchains/groestlcoin/default.nix @@ -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" diff --git a/pkgs/applications/networking/ftp/filezilla/default.nix b/pkgs/applications/networking/ftp/filezilla/default.nix index e8a1f90fbfa8..a6a0778eab31 100644 --- a/pkgs/applications/networking/ftp/filezilla/default.nix +++ b/pkgs/applications/networking/ftp/filezilla/default.nix @@ -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; { diff --git a/pkgs/applications/office/mmex/default.nix b/pkgs/applications/office/mmex/default.nix index af29fa9e9b05..c45500832f64 100644 --- a/pkgs/applications/office/mmex/default.nix +++ b/pkgs/applications/office/mmex/default.nix @@ -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 = [ diff --git a/pkgs/applications/radio/freedv/default.nix b/pkgs/applications/radio/freedv/default.nix index d53f67031600..678cc378ecc0 100644 --- a/pkgs/applications/radio/freedv/default.nix +++ b/pkgs/applications/radio/freedv/default.nix @@ -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 '' diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix index 8e788f270867..d596b8f936e2 100644 --- a/pkgs/applications/terminal-emulators/kitty/default.nix +++ b/pkgs/applications/terminal-emulators/kitty/default.nix @@ -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 diff --git a/pkgs/by-name/da/dark-mode-notify/package.nix b/pkgs/by-name/da/dark-mode-notify/package.nix index e749b0769c7f..0896b72bf3fe 100644 --- a/pkgs/by-name/da/dark-mode-notify/package.nix +++ b/pkgs/by-name/da/dark-mode-notify/package.nix @@ -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"; diff --git a/pkgs/by-name/fl/fluent-bit/package.nix b/pkgs/by-name/fl/fluent-bit/package.nix index 93638c5efab3..0a924cda634e 100644 --- a/pkgs/by-name/fl/fluent-bit/package.nix +++ b/pkgs/by-name/fl/fluent-bit/package.nix @@ -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. diff --git a/pkgs/by-name/gd/gdlv/package.nix b/pkgs/by-name/gd/gdlv/package.nix index 3c7900c80a99..87858f7a6752 100644 --- a/pkgs/by-name/gd/gdlv/package.nix +++ b/pkgs/by-name/gd/gdlv/package.nix @@ -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 diff --git a/pkgs/by-name/ju/junkie/package.nix b/pkgs/by-name/ju/junkie/package.nix index 40a80f4dad30..cd4e0af4de58 100644 --- a/pkgs/by-name/ju/junkie/package.nix +++ b/pkgs/by-name/ju/junkie/package.nix @@ -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 ''; diff --git a/pkgs/by-name/pa/pam-reattach/package.nix b/pkgs/by-name/pa/pam-reattach/package.nix index 6c3ccdf442dd..636757cec5ba 100644 --- a/pkgs/by-name/pa/pam-reattach/package.nix +++ b/pkgs/by-name/pa/pam-reattach/package.nix @@ -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 ]; diff --git a/pkgs/by-name/rs/rs/package.nix b/pkgs/by-name/rs/rs/package.nix index 35596386ecab..a6e58905a25f 100644 --- a/pkgs/by-name/rs/rs/package.nix +++ b/pkgs/by-name/rs/rs/package.nix @@ -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() }; } diff --git a/pkgs/by-name/tu/tup/package.nix b/pkgs/by-name/tu/tup/package.nix index 2b0299e219e1..4bccae8ee432 100644 --- a/pkgs/by-name/tu/tup/package.nix +++ b/pkgs/by-name/tu/tup/package.nix @@ -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; }; } diff --git a/pkgs/development/libraries/gtksourceview/5.x.nix b/pkgs/development/libraries/gtksourceview/5.x.nix index 8c1b6b46aa7b..7d951f7bc77e 100644 --- a/pkgs/development/libraries/gtksourceview/5.x.nix +++ b/pkgs/development/libraries/gtksourceview/5.x.nix @@ -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 diff --git a/pkgs/development/libraries/libfilezilla/default.nix b/pkgs/development/libraries/libfilezilla/default.nix index bbbcb81797af..76b8b28bf9bc 100644 --- a/pkgs/development/libraries/libfilezilla/default.nix +++ b/pkgs/development/libraries/libfilezilla/default.nix @@ -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; { diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 536c3da317bb..38578bd65d2d 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -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 diff --git a/pkgs/development/python-modules/intake/default.nix b/pkgs/development/python-modules/intake/default.nix index f87cfb013e0b..577322a8bc77 100644 --- a/pkgs/development/python-modules/intake/default.nix +++ b/pkgs/development/python-modules/intake/default.nix @@ -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" ]; diff --git a/pkgs/development/python-modules/sentence-transformers/default.nix b/pkgs/development/python-modules/sentence-transformers/default.nix index 8abff87c2328..49b0c4c42620 100644 --- a/pkgs/development/python-modules/sentence-transformers/default.nix +++ b/pkgs/development/python-modules/sentence-transformers/default.nix @@ -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"; }; } diff --git a/pkgs/development/python-modules/tensorflow/com_google_absl_fix_macos.patch b/pkgs/development/python-modules/tensorflow/com_google_absl_fix_macos.patch deleted file mode 100644 index 7da8ab1b2e9b..000000000000 --- a/pkgs/development/python-modules/tensorflow/com_google_absl_fix_macos.patch +++ /dev/null @@ -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 diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index be0c33711cea..ac2430d1a2b6 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -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. diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index ddf5bf3ae98a..0eb31d2d1f58 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -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 diff --git a/pkgs/development/python-modules/torch/pthreadpool-disable-gcd.diff b/pkgs/development/python-modules/torch/pthreadpool-disable-gcd.diff deleted file mode 100644 index eddd45723f8b..000000000000 --- a/pkgs/development/python-modules/torch/pthreadpool-disable-gcd.diff +++ /dev/null @@ -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 diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix index 5da3ca43a721..eb3d10016157 100644 --- a/pkgs/development/tools/py-spy/default.nix +++ b/pkgs/development/tools/py-spy/default.nix @@ -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 = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0be8e747eaed..27be71eb53c4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {