git.iko.soy/typeable/nixpkgs
on master help sign in
tk: use aqua backend on darwin

Most users don’t have xquartz, so let’s use the default window system for macOS.

commit82b8393bc4d102ea31b03d05fa0f3d2026e9976d authorMatthew Bauer <mjbauer95@gmail.com> dateTue 9 Apr 2019, 21:44 (8 years ago) parent11a6d01
1 file changed+7−6
pkgs/development/libraries/tk/generic.nix+7−6
pkgs/development/libraries/tk/generic.nix+7−6
@@ -1,4 +1,6 @@
1−{ stdenv, src, pkgconfig, tcl, libXft, fontconfig, patches ? [], ... }:
1+{ stdenv, lib, src, pkgconfig, tcl, libXft, fontconfig, patches ? []
2+, enableAqua ? stdenv.isDarwin, darwin
3+, ... }:
24
35stdenv.mkDerivation {
46 name = "tk-${tcl.version}";
@@ -21,15 +23,14 @@ stdenv.mkDerivation {
2123
2224 configureFlags = [
2325 "--with-tcl=${tcl}/lib"
24− ];
26+ ] ++ stdenv.lib.optional enableAqua "--enable-aqua";
2527
2628 nativeBuildInputs = [ pkgconfig ];
27− buildInputs = [ ]
28− ++ stdenv.lib.optional stdenv.isDarwin fontconfig;
2929
3030 propagatedBuildInputs = [ tcl libXft ];
31−
32− NIX_CFLAGS_LINK = if stdenv.isDarwin then "-lfontconfig" else null;
31+ buildInputs = lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [
32+ Cocoa cf-private
33+ ]);
3334
3435 doCheck = false; # fails. can't find itself
3536