diff options
Diffstat (limited to 'pkgs/development/libraries/tk/generic.nix')
-rw-r--r-- | pkgs/development/libraries/tk/generic.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/development/libraries/tk/generic.nix b/pkgs/development/libraries/tk/generic.nix new file mode 100644 index 00000000000..c3bab0b2f86 --- /dev/null +++ b/pkgs/development/libraries/tk/generic.nix @@ -0,0 +1,40 @@ +{ stdenv, src, pkgconfig, tcl, libXft, fontconfig, patches ? [], ... }: + +stdenv.mkDerivation { + name = "tk-${tcl.version}"; + + inherit src patches; + + postInstall = '' + ln -s $out/bin/wish* $out/bin/wish + ''; + + preConfigure = '' + cd unix + ''; + + configureFlags = [ + "--with-tcl=${tcl}/lib" + ]; + + buildInputs = [ pkgconfig tcl libXft ] + ++ stdenv.lib.optional stdenv.isDarwin fontconfig; + + NIX_CFLAGS_LINK = if stdenv.isDarwin then "-lfontconfig" else null; + + inherit tcl; + + passthru = rec { + inherit (tcl) release version; + libPrefix = "tk${tcl.release}"; + libdir = "lib/${libPrefix}"; + }; + + meta = with stdenv.lib; { + description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages"; + homepage = http://www.tcl.tk/; + license = licenses.tcltk; + platforms = platforms.all; + maintainers = with maintainers; [ lovek323 wkennington ]; + }; +} |