[staging] various: remove code for macOS < 11 (#370999)

This commit is contained in:
Emily
2025-01-05 16:14:02 +00:00
committed by GitHub
5 changed files with 4 additions and 42 deletions
+1 -11
View File
@@ -33,17 +33,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = lib.optionals guileSupport [ pkg-config ];
buildInputs = lib.optionals guileSupport [ guile ];
configureFlags =
lib.optional guileSupport "--with-guile"
# Make uses this test to decide whether it should keep track of
# subseconds. Apple made this possible with APFS and macOS 10.13.
# However, we still support macOS 10.11 and 10.12. Binaries built
# in Nixpkgs will be unable to use futimens to set mtime less than
# a second. So, tell Make to ignore nanoseconds in mtime here by
# overriding the autoconf test for the struct.
# See https://github.com/NixOS/nixpkgs/issues/51221 for discussion.
++ lib.optional stdenv.hostPlatform.isDarwin "ac_cv_struct_st_mtim_nsec=no";
configureFlags = lib.optional guileSupport "--with-guile";
outputs = [
"out"
-6
View File
@@ -39,12 +39,6 @@ stdenv.mkDerivation rec {
libxcrypt
];
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# This is a temporary workaround for missing headers in the 10.12 SDK to avoid a mass rebuild.
# A commit to revert this change will be included in the fix PR targeting staging.
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
# Don't use help2man if cross-compiling
# https://lists.gnu.org/archive/html/bug-sed/2017-01/msg00001.html
# https://git.congatec.com/yocto/meta-openembedded/blob/3402bfac6b595c622e4590a8ff5eaaa854e2a2a3/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.1.bb#L44
@@ -37,10 +37,6 @@ stdenv.mkDerivation (finalAttrs: {
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace test/meson.build \
--replace "[ 'cgl_epoxy_api', [ 'cgl_epoxy_api.c' ] ]," ""
''
+ lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
substituteInPlace test/meson.build \
--replace "[ 'cgl_core', [ 'cgl_core.c' ] ]," ""
'';
outputs = [ "out" "dev" ];
+2 -10
View File
@@ -1,5 +1,5 @@
{ stdenv, lib, src, pkg-config, tcl, libXft, zip, zlib, patches ? []
, enableAqua ? stdenv.hostPlatform.isDarwin, darwin
, enableAqua ? stdenv.hostPlatform.isDarwin
, ... }:
tcl.mkTclDerivation {
@@ -21,10 +21,6 @@ tcl.mkTclDerivation {
for file in $(find library/demos/. -type f ! -name "*.*"); do
substituteInPlace $file --replace "exec wish" "exec $out/bin/wish"
done
''
+ lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") ''
substituteInPlace unix/configure* \
--replace-fail " -weak_framework UniformTypeIdentifiers" ""
'';
postInstall = ''
@@ -62,11 +58,7 @@ tcl.mkTclDerivation {
propagatedBuildInputs = [
libXft
] ++ lib.optionals enableAqua ([
darwin.apple_sdk.frameworks.Cocoa
] ++ lib.optionals (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") [
darwin.apple_sdk.frameworks.UniformTypeIdentifiers
]);
];
enableParallelBuilding = true;
@@ -43,17 +43,7 @@ stdenv.mkDerivation rec {
];
buildInputs = lib.optionals guileEnabled [ guile ];
configureFlags =
lib.optional guileEnabled "--with-guile"
# Make uses this test to decide whether it should keep track of
# subseconds. Apple made this possible with APFS and macOS 10.13.
# However, we still support macOS 10.11 and 10.12. Binaries built
# in Nixpkgs will be unable to use futimens to set mtime less than
# a second. So, tell Make to ignore nanoseconds in mtime here by
# overriding the autoconf test for the struct.
# See https://github.com/NixOS/nixpkgs/issues/51221 for discussion.
++ lib.optional stdenv.hostPlatform.isDarwin "ac_cv_struct_st_mtim_nsec=no";
configureFlags = lib.optional guileEnabled "--with-guile";
outputs = [
"out"