nixpkgs/pkgs/development/libraries/tk/generic.nix

57 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, lib, src, pkgconfig, tcl, libXft, patches ? []
, enableAqua ? stdenv.isDarwin, darwin
, ... }:
stdenv.mkDerivation {
name = "tk-${tcl.version}";
2015-06-19 14:54:35 +01:00
inherit src patches;
outputs = [ "out" "man" "dev" ];
setOutputFlags = false;
2015-04-30 19:42:43 +01:00
preConfigure = ''
configureFlagsArray+=(--mandir=$man/share/man --enable-man-symlinks)
2015-04-30 19:42:43 +01:00
cd unix
'';
postInstall = ''
ln -s $out/bin/wish* $out/bin/wish
cp ../{unix,generic}/*.h $out/include
ln -s $out/lib/libtk${tcl.release}${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libtk${stdenv.hostPlatform.extensions.sharedLibrary}
''
+ stdenv.lib.optionalString (stdenv.isDarwin) ''
cp ../macosx/*.h $out/include
'';
2015-04-30 19:42:43 +01:00
configureFlags = [
"--enable-threads"
2015-04-30 19:42:43 +01:00
"--with-tcl=${tcl}/lib"
] ++ stdenv.lib.optional stdenv.is64bit "--enable-64bit"
++ stdenv.lib.optional enableAqua "--enable-aqua";
nativeBuildInputs = [ pkgconfig ];
2019-06-20 17:39:41 +01:00
buildInputs = lib.optional enableAqua (with darwin.apple_sdk.frameworks; [ Cocoa ]);
2019-06-20 17:39:41 +01:00
propagatedBuildInputs = [ tcl libXft ];
doCheck = false; # fails. can't find itself
inherit tcl;
passthru = rec {
inherit (tcl) release version;
libPrefix = "tk${tcl.release}";
libdir = "lib/${libPrefix}";
};
2013-06-29 23:39:32 +01:00
2015-04-30 19:42:43 +01:00
meta = with stdenv.lib; {
2013-06-29 23:39:32 +01:00
description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages";
homepage = "https://www.tcl.tk/";
2015-04-30 19:42:43 +01:00
license = licenses.tcltk;
platforms = platforms.all;
maintainers = with maintainers; [ lovek323 vrthra ];
2013-06-29 23:39:32 +01:00
};
}