[staging-next] pango, tk: fix build on darwin (#537038)

This commit is contained in:
Martin Weinelt
2026-07-01 04:16:55 +02:00
committed by GitHub
2 changed files with 35 additions and 5 deletions
+19 -2
View File
@@ -25,6 +25,8 @@
buildPackages,
gobject-introspection,
testers,
# TODO: Clean up on `staging`.
llvmPackages,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -58,6 +60,10 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optionals withIntrospection [
gi-docgen
gobject-introspection
]
# TODO: Clean up on `staging`.
++ lib.optionals stdenv.hostPlatform.isDarwin [
llvmPackages.lld
];
buildInputs = [
@@ -83,8 +89,17 @@ stdenv.mkDerivation (finalAttrs: {
];
# Fontconfig error: Cannot load default config file
env.FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [ freefont_ttf ];
env = {
FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [ freefont_ttf ];
};
}
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# workaround for ld64 hardening issue
#
# TODO: Clean up on `staging`
CC_LD = "lld";
OBJC_LD = "lld";
};
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
@@ -139,6 +154,8 @@ stdenv.mkDerivation (finalAttrs: {
"pangofc"
"pangoft2"
"pangoot"
]
++ lib.optionals x11Support [
"pangoxft"
];
};
+16 -3
View File
@@ -9,6 +9,8 @@
zlib,
patches ? [ ],
enableAqua ? stdenv.hostPlatform.isDarwin,
# TODO: Clean up on `staging`.
llvmPackages,
...
}:
@@ -74,6 +76,10 @@ tcl.mkTclDerivation {
++ lib.optionals (lib.versionAtLeast tcl.version "9.0") [
# Only used to detect the presence of zlib. Could be replaced with a stub.
zip
]
# TODO: Clean up on `staging`.
++ lib.optionals stdenv.hostPlatform.isDarwin [
llvmPackages.lld
];
buildInputs = lib.optionals (lib.versionAtLeast tcl.version "9.0") [
zlib
@@ -89,9 +95,16 @@ tcl.mkTclDerivation {
inherit tcl;
env = lib.optionalAttrs (lib.versionOlder tcl.version "8.6") {
NIX_CFLAGS_COMPILE = "-std=gnu17";
};
env =
lib.optionalAttrs (lib.versionOlder tcl.version "8.6") {
NIX_CFLAGS_COMPILE = "-std=gnu17";
}
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# workaround for ld64 hardening issue
#
# TODO: Clean up on `staging`
NIX_CFLAGS_COMPILE = "-fuse-ld=lld";
};
passthru = rec {
inherit (tcl) release version;