nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, src, pkgconfig, tcl, libXft, fontconfig, patches ? [], ... }:
2
3stdenv.mkDerivation {
4 name = "tk-${tcl.version}";
5
6 inherit src patches;
7
8 outputs = [ "out" "man" "dev" ];
9
10 setOutputFlags = false;
11
12 preConfigure = ''
13 configureFlagsArray+=(--mandir=$man/share/man --enable-man-symlinks)
14 cd unix
15 '';
16
17 postInstall = ''
18 ln -s $out/bin/wish* $out/bin/wish
19 cp ../{unix,generic}/*.h $out/include
20 '';
21
22 configureFlags = [
23 "--with-tcl=${tcl}/lib"
24 ];
25
26 buildInputs = [ pkgconfig ]
27 ++ stdenv.lib.optional stdenv.isDarwin fontconfig;
28
29 propagatedBuildInputs = [ tcl libXft ];
30
31 NIX_CFLAGS_LINK = if stdenv.isDarwin then "-lfontconfig" else null;
32
33 inherit tcl;
34
35 passthru = rec {
36 inherit (tcl) release version;
37 libPrefix = "tk${tcl.release}";
38 libdir = "lib/${libPrefix}";
39 };
40
41 meta = with stdenv.lib; {
42 description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages";
43 homepage = http://www.tcl.tk/;
44 license = licenses.tcltk;
45 platforms = platforms.all;
46 maintainers = with maintainers; [ lovek323 vrthra wkennington ];
47 };
48}