apple-sdk: propagate the libutil
library (#353873)
This commit is contained in:
commit
8072991b1d
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, pkg-config, ncurses, buildPackages, darwin }:
|
{ lib, stdenv, fetchFromGitHub, pkg-config, ncurses, buildPackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "mg";
|
pname = "mg";
|
||||||
@ -25,7 +25,7 @@ stdenv.mkDerivation {
|
|||||||
'';
|
'';
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
||||||
buildInputs = [ ncurses ] ++ lib.optional stdenv.isDarwin [ darwin.libutil ];
|
buildInputs = [ ncurses ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Micro GNU/emacs, a portable version of the mg maintained by the OpenBSD team";
|
description = "Micro GNU/emacs, a portable version of the mg maintained by the OpenBSD team";
|
||||||
|
@ -139,7 +139,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
# Xcode project or pass it as a flag to xcodebuild as well.
|
# Xcode project or pass it as a flag to xcodebuild as well.
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
substituteInPlace src/auto/config.mk \
|
substituteInPlace src/auto/config.mk \
|
||||||
--replace "PERL_CFLAGS${"\t"}=" "PERL_CFLAGS${"\t"}= -I${darwin.libutil}/include" \
|
|
||||||
--replace " -L${stdenv.cc.libc}/lib" "" \
|
--replace " -L${stdenv.cc.libc}/lib" "" \
|
||||||
--replace " -L${darwin.libobjc}/lib" "" \
|
--replace " -L${darwin.libobjc}/lib" "" \
|
||||||
--replace " -L${darwin.libunwind}/lib" "" \
|
--replace " -L${darwin.libunwind}/lib" "" \
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
, suitesparse
|
, suitesparse
|
||||||
, python3
|
, python3
|
||||||
, libintl
|
, libintl
|
||||||
, libiconv
|
|
||||||
, darwin
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# this is a fork version of fetk (http://www.fetk.org/)
|
# this is a fork version of fetk (http://www.fetk.org/)
|
||||||
@ -87,8 +85,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
python3
|
python3
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
libintl
|
libintl
|
||||||
libiconv
|
|
||||||
darwin.libutil
|
|
||||||
];
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
, antlr4
|
, antlr4
|
||||||
, capnproto
|
, capnproto
|
||||||
, nlohmann_json
|
, nlohmann_json
|
||||||
, darwin
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
@ -46,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
capnproto
|
capnproto
|
||||||
antlr4.runtime.cpp
|
antlr4.runtime.cpp
|
||||||
nlohmann_json
|
nlohmann_json
|
||||||
] ++ lib.optional stdenv.isDarwin [ darwin.libutil ];
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DSURELOG_USE_HOST_CAPNP=On"
|
"-DSURELOG_USE_HOST_CAPNP=On"
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
, python3
|
, python3
|
||||||
, capnproto
|
, capnproto
|
||||||
, gtest
|
, gtest
|
||||||
, darwin
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
@ -29,8 +28,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
capnproto
|
capnproto
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
||||||
darwin.libutil
|
|
||||||
];
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, fetchurl, stdenv, zlib, ncurses, libiconv, darwin }:
|
{ lib, fetchurl, stdenv, zlib, ncurses, libiconv, apple-sdk_11, darwinMinVersionHook }:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "fnc";
|
pname = "fnc";
|
||||||
@ -9,18 +9,13 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-npS+sOxF0S/9TuFjtEFlev0HpIOsaP6zmcfopPNUehk=";
|
hash = "sha256-npS+sOxF0S/9TuFjtEFlev0HpIOsaP6zmcfopPNUehk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libiconv ncurses zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
buildInputs = [ libiconv ncurses zlib apple-sdk_11 (darwinMinVersionHook "11.0") ];
|
||||||
darwin.libutil
|
|
||||||
];
|
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" ];
|
makeFlags = [ "PREFIX=$(out)" ];
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
|
||||||
# Needed with GCC 12
|
# Needed with GCC 12
|
||||||
"-Wno-error=maybe-uninitialized"
|
"-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 = ''
|
preInstall = ''
|
||||||
|
@ -54,6 +54,8 @@ self: super: {
|
|||||||
libiconv
|
libiconv
|
||||||
darwin.libresolv
|
darwin.libresolv
|
||||||
darwin.libsbuf
|
darwin.libsbuf
|
||||||
|
# Shipped with the SDK only as a library with no headers
|
||||||
|
(lib.getLib darwin.libutil)
|
||||||
# Required by some SDK headers
|
# Required by some SDK headers
|
||||||
cupsHeaders
|
cupsHeaders
|
||||||
]
|
]
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
cmake,
|
cmake,
|
||||||
gettext,
|
gettext,
|
||||||
msgpack-c,
|
msgpack-c,
|
||||||
darwin,
|
|
||||||
libuv,
|
libuv,
|
||||||
lua,
|
lua,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
@ -145,7 +144,6 @@ stdenv.mkDerivation (
|
|||||||
tree-sitter
|
tree-sitter
|
||||||
unibilium
|
unibilium
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil ]
|
|
||||||
++ lib.optionals finalAttrs.finalPackage.doCheck [
|
++ lib.optionals finalAttrs.finalPackage.doCheck [
|
||||||
glibcLocales
|
glibcLocales
|
||||||
procps
|
procps
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, makeWrapper, darwin }:
|
{ lib, stdenv, fetchFromGitHub, makeWrapper }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.11";
|
version = "0.11";
|
||||||
@ -13,8 +13,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.libutil;
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
make install PREFIX="$out"
|
make install PREFIX="$out"
|
||||||
'';
|
'';
|
||||||
|
@ -140,10 +140,6 @@ let
|
|||||||
] ++ lib.optionals (x11Support && stdenv.hostPlatform.isDarwin) [
|
] ++ lib.optionals (x11Support && stdenv.hostPlatform.isDarwin) [
|
||||||
./use-correct-tcl-tk-on-darwin.patch
|
./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 [
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
|
|
||||||
# Disable the use of ldconfig in ctypes.util.find_library (since
|
# Disable the use of ldconfig in ctypes.util.find_library (since
|
||||||
|
@ -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 <utmp.h>
|
|
||||||
#endif /* HAVE_UTMP_H */
|
|
||||||
-#elif defined(HAVE_LIBUTIL_H)
|
|
||||||
+#elif defined(HAVE_LIBUTIL_H) && !defined(__APPLE__)
|
|
||||||
#include <libutil.h>
|
|
||||||
#elif defined(HAVE_UTIL_H)
|
|
||||||
#include <util.h>
|
|
@ -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 <pty.h>
|
|
||||||
-#else
|
|
||||||
+#endif
|
|
||||||
#ifdef HAVE_LIBUTIL_H
|
|
||||||
#include <libutil.h>
|
|
||||||
-#else
|
|
||||||
+#endif
|
|
||||||
#ifdef HAVE_UTIL_H
|
|
||||||
#include <util.h>
|
|
||||||
-#endif /* HAVE_UTIL_H */
|
|
||||||
-#endif /* HAVE_LIBUTIL_H */
|
|
||||||
-#endif /* HAVE_PTY_H */
|
|
||||||
+#endif
|
|
||||||
#ifdef HAVE_STROPTS_H
|
|
||||||
#include <stropts.h>
|
|
||||||
#endif
|
|
@ -271,11 +271,6 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
|||||||
] ++ optionals mimetypesSupport [
|
] ++ optionals mimetypesSupport [
|
||||||
# Make the mimetypes module refer to the right file
|
# Make the mimetypes module refer to the right file
|
||||||
./mimetypes.patch
|
./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) [
|
] ++ optionals (pythonAtLeast "3.9" && pythonOlder "3.11" && stdenv.hostPlatform.isDarwin) [
|
||||||
# Stop checking for TCL/TK in global macOS locations
|
# Stop checking for TCL/TK in global macOS locations
|
||||||
./3.9/darwin-tcl-tk.patch
|
./3.9/darwin-tcl-tk.patch
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ lib, stdenv, substituteAll, fetchurl
|
{ lib, stdenv, substituteAll, fetchurl
|
||||||
, zlibSupport ? true, zlib
|
, zlibSupport ? true, zlib
|
||||||
, bzip2, pkg-config, libffi, darwin
|
, bzip2, pkg-config, libffi
|
||||||
, sqlite, openssl, ncurses, python, expat, tcl, tk, tclPackages, libX11
|
, sqlite, openssl, ncurses, python, expat, tcl, tk, tclPackages, libX11
|
||||||
, gdbm, db, xz, python-setup-hook
|
, gdbm, db, xz, python-setup-hook
|
||||||
, optimizationLevel ? "jit", boehmgc
|
, optimizationLevel ? "jit", boehmgc
|
||||||
@ -63,8 +63,6 @@ in with passthru; stdenv.mkDerivation rec {
|
|||||||
zlib
|
zlib
|
||||||
] ++ lib.optionals (lib.any (l: l == optimizationLevel) [ "0" "1" "2" "3"]) [
|
] ++ lib.optionals (lib.any (l: l == optimizationLevel) [ "0" "1" "2" "3"]) [
|
||||||
boehmgc
|
boehmgc
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
||||||
darwin.libutil
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Remove bootstrap python from closure
|
# Remove bootstrap python from closure
|
||||||
|
@ -87,7 +87,11 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
nativeBuildInputs = [ automake autoconf libtool pkg-config ];
|
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 = ''
|
preConfigure = ''
|
||||||
LIBTOOLIZE=libtoolize ./autogen.sh
|
LIBTOOLIZE=libtoolize ./autogen.sh
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
groff,
|
groff,
|
||||||
compatIfNeeded,
|
compatIfNeeded,
|
||||||
fts,
|
fts,
|
||||||
darwin,
|
|
||||||
stdenv,
|
stdenv,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -44,8 +43,7 @@ mkDerivation {
|
|||||||
# fts header is needed. glibc already has this header, but musl doesn't,
|
# 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
|
# so make sure pkgsMusl.netbsd.install still builds in case you want to
|
||||||
# remove it!
|
# remove it!
|
||||||
++ [ fts ]
|
++ [ fts ];
|
||||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil ];
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ mkAppleDerivation {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
apple-sdk_14
|
(apple-sdk_14.override { enableBootstrap = true; })
|
||||||
copyfile
|
copyfile
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchpatch, fetchzip, writeText, darwin, conf ? null }:
|
{ lib, stdenv, fetchpatch, fetchzip, writeText, conf ? null }:
|
||||||
|
|
||||||
let
|
let
|
||||||
rev = "8c32909a159aaa9484c82b71f05b7a73321eb491";
|
rev = "8c32909a159aaa9484c82b71f05b7a73321eb491";
|
||||||
@ -21,10 +21,6 @@ stdenv.mkDerivation {
|
|||||||
installFlags = [ "install-completion" ];
|
installFlags = [ "install-completion" ];
|
||||||
CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE";
|
CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE";
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
||||||
darwin.libutil
|
|
||||||
];
|
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# https://github.com/martanne/abduco/pull/22
|
# https://github.com/martanne/abduco/pull/22
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, ncurses, darwin }:
|
{ lib, stdenv, fetchFromGitHub, ncurses }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "mtm";
|
pname = "mtm";
|
||||||
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0gibrvah059z37jvn1qs4b6kvd4ivk2mfihmcpgx1vz6yg70zghv";
|
sha256 = "0gibrvah059z37jvn1qs4b6kvd4ivk2mfihmcpgx1vz6yg70zghv";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ ncurses ] ++ lib.optionals stdenv.isDarwin [ darwin.libutil ];
|
buildInputs = [ ncurses ];
|
||||||
|
|
||||||
makeFlags = [ "DESTDIR=${placeholder "out"}" "MANDIR=${placeholder "out"}/share/man/man1" ];
|
makeFlags = [ "DESTDIR=${placeholder "out"}" "MANDIR=${placeholder "out"}/share/man/man1" ];
|
||||||
|
|
||||||
|
@ -32,8 +32,6 @@ stdenv.mkDerivation rec {
|
|||||||
openssl
|
openssl
|
||||||
protobuf
|
protobuf
|
||||||
zlib
|
zlib
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
||||||
darwin.libutil
|
|
||||||
];
|
];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user