From 42522c0850be7c5952e8fde23c7fd61503d92737 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 21:47:03 +0100 Subject: [PATCH 1/4] gnumake{,42}: remove code for macOS < 11 --- pkgs/by-name/gn/gnumake42/package.nix | 12 +----------- .../tools/build-managers/gnumake/default.nix | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/gn/gnumake42/package.nix b/pkgs/by-name/gn/gnumake42/package.nix index dc323447af9b..2d7b0394a004 100644 --- a/pkgs/by-name/gn/gnumake42/package.nix +++ b/pkgs/by-name/gn/gnumake42/package.nix @@ -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" diff --git a/pkgs/development/tools/build-managers/gnumake/default.nix b/pkgs/development/tools/build-managers/gnumake/default.nix index e5fc56c2249b..81cfedf6f604 100644 --- a/pkgs/development/tools/build-managers/gnumake/default.nix +++ b/pkgs/development/tools/build-managers/gnumake/default.nix @@ -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" From f43d8aed31cefa4049bd8c49f5e6c7a561597c5d Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 21:39:55 +0100 Subject: [PATCH 2/4] tk-{8_5,8_6,9_0}: remove code for macOS < 11 --- pkgs/development/libraries/tk/generic.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/tk/generic.nix b/pkgs/development/libraries/tk/generic.nix index dfe14f22ec45..9374a045c054 100644 --- a/pkgs/development/libraries/tk/generic.nix +++ b/pkgs/development/libraries/tk/generic.nix @@ -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; From b01bac1aba4072a3cec5fbb6e164ab0c5c7e50b1 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 22:31:46 +0100 Subject: [PATCH 3/4] libepoxy: remove code for macOS < 11 --- pkgs/development/libraries/libepoxy/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/libraries/libepoxy/default.nix b/pkgs/development/libraries/libepoxy/default.nix index 5ff8055cedee..fcf8e65c4de5 100644 --- a/pkgs/development/libraries/libepoxy/default.nix +++ b/pkgs/development/libraries/libepoxy/default.nix @@ -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" ]; From 31b249af51eb2a4f37e7e993e177334001c9d78e Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 20:10:09 +0100 Subject: [PATCH 4/4] Revert "inetutils: fix build on x86_64-darwin" Should no longer be necessary, per the comment. This reverts commit 2feff8a9bf1e688ea70c1df724c9b4235b891ee0. --- pkgs/by-name/in/inetutils/package.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/by-name/in/inetutils/package.nix b/pkgs/by-name/in/inetutils/package.nix index 53c8a2de9bc4..ddd96ffb3042 100644 --- a/pkgs/by-name/in/inetutils/package.nix +++ b/pkgs/by-name/in/inetutils/package.nix @@ -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