mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
tk: fix build on darwin
This commit is contained in:
parent
e00f711fb2
commit
80748a6ce4
1 changed files with 16 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue