diff --git a/pkgs/applications/editors/mg/default.nix b/pkgs/applications/editors/mg/default.nix index 70f5dd604296..2b69571a9109 100644 --- a/pkgs/applications/editors/mg/default.nix +++ b/pkgs/applications/editors/mg/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, ncurses, buildPackages, darwin }: +{ lib, stdenv, fetchFromGitHub, pkg-config, ncurses, buildPackages }: stdenv.mkDerivation { pname = "mg"; @@ -25,7 +25,7 @@ stdenv.mkDerivation { ''; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ncurses ] ++ lib.optional stdenv.isDarwin [ darwin.libutil ]; + buildInputs = [ ncurses ]; meta = with lib; { description = "Micro GNU/emacs, a portable version of the mg maintained by the OpenBSD team"; diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix index 2005eef7b6fe..23aa24ff9b6d 100644 --- a/pkgs/applications/editors/vim/macvim.nix +++ b/pkgs/applications/editors/vim/macvim.nix @@ -139,7 +139,6 @@ stdenv.mkDerivation (finalAttrs: { # Xcode project or pass it as a flag to xcodebuild as well. postConfigure = '' substituteInPlace src/auto/config.mk \ - --replace "PERL_CFLAGS${"\t"}=" "PERL_CFLAGS${"\t"}= -I${darwin.libutil}/include" \ --replace " -L${stdenv.cc.libc}/lib" "" \ --replace " -L${darwin.libobjc}/lib" "" \ --replace " -L${darwin.libunwind}/lib" "" \ diff --git a/pkgs/applications/science/chemistry/apbs/default.nix b/pkgs/applications/science/chemistry/apbs/default.nix index 87cd5fed1373..bb8ba7afeff3 100644 --- a/pkgs/applications/science/chemistry/apbs/default.nix +++ b/pkgs/applications/science/chemistry/apbs/default.nix @@ -7,8 +7,6 @@ , suitesparse , python3 , libintl -, libiconv -, darwin }: let # this is a fork version of fetk (http://www.fetk.org/) @@ -87,8 +85,6 @@ stdenv.mkDerivation (finalAttrs: { python3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libintl - libiconv - darwin.libutil ]; cmakeFlags = [ diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index 595a3e168040..0d795611b95a 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -12,7 +12,6 @@ , antlr4 , capnproto , nlohmann_json -, darwin }: stdenv.mkDerivation (finalAttrs: { @@ -46,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: { capnproto antlr4.runtime.cpp nlohmann_json - ] ++ lib.optional stdenv.isDarwin [ darwin.libutil ]; + ]; cmakeFlags = [ "-DSURELOG_USE_HOST_CAPNP=On" diff --git a/pkgs/applications/science/logic/uhdm/default.nix b/pkgs/applications/science/logic/uhdm/default.nix index eb078d482732..72b55ffbcd7a 100644 --- a/pkgs/applications/science/logic/uhdm/default.nix +++ b/pkgs/applications/science/logic/uhdm/default.nix @@ -5,7 +5,6 @@ , python3 , capnproto , gtest -, darwin }: stdenv.mkDerivation (finalAttrs: { @@ -29,8 +28,6 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ capnproto - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil ]; cmakeFlags = [ diff --git a/pkgs/applications/version-management/fnc/default.nix b/pkgs/applications/version-management/fnc/default.nix index 293fb563af60..71682501b28f 100644 --- a/pkgs/applications/version-management/fnc/default.nix +++ b/pkgs/applications/version-management/fnc/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, stdenv, zlib, ncurses, libiconv, darwin }: +{ lib, fetchurl, stdenv, zlib, ncurses, libiconv, apple-sdk_11, darwinMinVersionHook }: stdenv.mkDerivation (finalAttrs: { pname = "fnc"; @@ -9,18 +9,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-npS+sOxF0S/9TuFjtEFlev0HpIOsaP6zmcfopPNUehk="; }; - buildInputs = [ libiconv ncurses zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil - ]; + buildInputs = [ libiconv ncurses zlib apple-sdk_11 (darwinMinVersionHook "11.0") ]; makeFlags = [ "PREFIX=$(out)" ]; env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ # Needed with GCC 12 "-Wno-error=maybe-uninitialized" - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # error: 'strtonum' is only available on macOS 11.0 or newer - "-Wno-error=unguarded-availability-new" ]); preInstall = '' diff --git a/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix b/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix index f4d80eed0b49..668ac586cb01 100644 --- a/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix +++ b/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix @@ -54,6 +54,8 @@ self: super: { libiconv darwin.libresolv darwin.libsbuf + # Shipped with the SDK only as a library with no headers + (lib.getLib darwin.libutil) # Required by some SDK headers cupsHeaders ] diff --git a/pkgs/by-name/ne/neovim-unwrapped/package.nix b/pkgs/by-name/ne/neovim-unwrapped/package.nix index 46d941a4e40b..fb185d85f646 100644 --- a/pkgs/by-name/ne/neovim-unwrapped/package.nix +++ b/pkgs/by-name/ne/neovim-unwrapped/package.nix @@ -6,7 +6,6 @@ cmake, gettext, msgpack-c, - darwin, libuv, lua, pkg-config, @@ -145,7 +144,6 @@ stdenv.mkDerivation ( tree-sitter unibilium ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil ] ++ lib.optionals finalAttrs.finalPackage.doCheck [ glibcLocales procps diff --git a/pkgs/development/interpreters/chibi/default.nix b/pkgs/development/interpreters/chibi/default.nix index 09ffa3ca2128..9cdd21a6b955 100644 --- a/pkgs/development/interpreters/chibi/default.nix +++ b/pkgs/development/interpreters/chibi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, makeWrapper, darwin }: +{ lib, stdenv, fetchFromGitHub, makeWrapper }: stdenv.mkDerivation rec { version = "0.11"; @@ -13,8 +13,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.libutil; - installPhase = '' make install PREFIX="$out" ''; diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 0d2ebd009731..7e926d682810 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -140,10 +140,6 @@ let ] ++ lib.optionals (x11Support && stdenv.hostPlatform.isDarwin) [ ./use-correct-tcl-tk-on-darwin.patch - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # Fix darwin build https://bugs.python.org/issue34027 - ../3.7/darwin-libutil.patch - ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # Disable the use of ldconfig in ctypes.util.find_library (since diff --git a/pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch b/pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch deleted file mode 100644 index 92b846be0002..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index 40229bce0f..3cc604930e 100644 ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -7258,7 +7258,7 @@ os_sched_getaffinity_impl(PyObject *module, pid_t pid) - #ifdef HAVE_UTMP_H - #include - #endif /* HAVE_UTMP_H */ --#elif defined(HAVE_LIBUTIL_H) -+#elif defined(HAVE_LIBUTIL_H) && !defined(__APPLE__) - #include - #elif defined(HAVE_UTIL_H) - #include diff --git a/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch b/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch deleted file mode 100644 index 51e3cb6d7f11..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index c3682b4..16826c6 100644 ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -5880,15 +5880,13 @@ error: - #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX) - #ifdef HAVE_PTY_H - #include --#else -+#endif - #ifdef HAVE_LIBUTIL_H - #include --#else -+#endif - #ifdef HAVE_UTIL_H - #include --#endif /* HAVE_UTIL_H */ --#endif /* HAVE_LIBUTIL_H */ --#endif /* HAVE_PTY_H */ -+#endif - #ifdef HAVE_STROPTS_H - #include - #endif diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index f9da42de0b1c..20c7c0c145ef 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -271,11 +271,6 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { ] ++ optionals mimetypesSupport [ # Make the mimetypes module refer to the right file ./mimetypes.patch - ] ++ optionals (pythonAtLeast "3.7" && pythonOlder "3.11") [ - # Fix darwin build https://bugs.python.org/issue34027 - ./3.7/darwin-libutil.patch - ] ++ optionals (pythonAtLeast "3.11") [ - ./3.11/darwin-libutil.patch ] ++ optionals (pythonAtLeast "3.9" && pythonOlder "3.11" && stdenv.hostPlatform.isDarwin) [ # Stop checking for TCL/TK in global macOS locations ./3.9/darwin-tcl-tk.patch diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index b850c79be87a..795bceede768 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, substituteAll, fetchurl , zlibSupport ? true, zlib -, bzip2, pkg-config, libffi, darwin +, bzip2, pkg-config, libffi , sqlite, openssl, ncurses, python, expat, tcl, tk, tclPackages, libX11 , gdbm, db, xz, python-setup-hook , optimizationLevel ? "jit", boehmgc @@ -63,8 +63,6 @@ in with passthru; stdenv.mkDerivation rec { zlib ] ++ lib.optionals (lib.any (l: l == optimizationLevel) [ "0" "1" "2" "3"]) [ boehmgc - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil ]; # Remove bootstrap python from closure diff --git a/pkgs/development/libraries/libuv/default.nix b/pkgs/development/libraries/libuv/default.nix index 7f9aac48e725..181462dc39dd 100644 --- a/pkgs/development/libraries/libuv/default.nix +++ b/pkgs/development/libraries/libuv/default.nix @@ -87,7 +87,11 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ automake autoconf libtool pkg-config ]; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil ]; + # This is part of the Darwin bootstrap, so we don’t always get + # `libutil.dylib` automatically propagated through the SDK. + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ + (lib.getLib darwin.libutil) + ]; preConfigure = '' LIBTOOLIZE=libtoolize ./autogen.sh diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix index b179544eaee3..84934b592171 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix @@ -11,7 +11,6 @@ groff, compatIfNeeded, fts, - darwin, stdenv, }: @@ -44,8 +43,7 @@ mkDerivation { # fts header is needed. glibc already has this header, but musl doesn't, # so make sure pkgsMusl.netbsd.install still builds in case you want to # remove it! - ++ [ fts ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil ]; + ++ [ fts ]; installPhase = '' runHook preInstall diff --git a/pkgs/os-specific/darwin/apple-source-releases/libutil/package.nix b/pkgs/os-specific/darwin/apple-source-releases/libutil/package.nix index c783b1edfe56..95f35054e026 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libutil/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libutil/package.nix @@ -21,7 +21,7 @@ mkAppleDerivation { ]; buildInputs = [ - apple-sdk_14 + (apple-sdk_14.override { enableBootstrap = true; }) copyfile ]; diff --git a/pkgs/tools/misc/abduco/default.nix b/pkgs/tools/misc/abduco/default.nix index 1f454d40bc85..eef5fe0df344 100644 --- a/pkgs/tools/misc/abduco/default.nix +++ b/pkgs/tools/misc/abduco/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchpatch, fetchzip, writeText, darwin, conf ? null }: +{ lib, stdenv, fetchpatch, fetchzip, writeText, conf ? null }: let rev = "8c32909a159aaa9484c82b71f05b7a73321eb491"; @@ -21,10 +21,6 @@ stdenv.mkDerivation { installFlags = [ "install-completion" ]; CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil - ]; - patches = [ # https://github.com/martanne/abduco/pull/22 (fetchpatch { diff --git a/pkgs/tools/misc/mtm/default.nix b/pkgs/tools/misc/mtm/default.nix index 97d2c72d52be..8ecbc087894b 100644 --- a/pkgs/tools/misc/mtm/default.nix +++ b/pkgs/tools/misc/mtm/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, ncurses, darwin }: +{ lib, stdenv, fetchFromGitHub, ncurses }: stdenv.mkDerivation rec { pname = "mtm"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "0gibrvah059z37jvn1qs4b6kvd4ivk2mfihmcpgx1vz6yg70zghv"; }; - buildInputs = [ ncurses ] ++ lib.optionals stdenv.isDarwin [ darwin.libutil ]; + buildInputs = [ ncurses ]; makeFlags = [ "DESTDIR=${placeholder "out"}" "MANDIR=${placeholder "out"}/share/man/man1" ]; diff --git a/pkgs/tools/networking/eternal-terminal/default.nix b/pkgs/tools/networking/eternal-terminal/default.nix index c580d02a794f..3096ea67840f 100644 --- a/pkgs/tools/networking/eternal-terminal/default.nix +++ b/pkgs/tools/networking/eternal-terminal/default.nix @@ -32,8 +32,6 @@ stdenv.mkDerivation rec { openssl protobuf zlib - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil ]; preBuild = ''