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

46 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, tcl, libXft, fontconfig }:
stdenv.mkDerivation {
name = "tk-${tcl.version}";
src = fetchurl {
url = "mirror://sourceforge/tcl/tk${tcl.version}-src.tar.gz";
2015-03-29 23:01:38 +02:00
sha256 = "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88";
};
2014-01-25 03:36:20 +01:00
patches = [ ./different-prefix-with-tcl.patch ];
postInstall = ''
ln -s $out/bin/wish* $out/bin/wish
'';
2015-04-30 20:42:43 +02:00
preConfigure = ''
cd unix
'';
2015-04-30 20:42:43 +02:00
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}";
};
2013-06-30 00:39:32 +02:00
2015-04-30 20:42:43 +02:00
meta = with stdenv.lib; {
2013-06-30 00:39:32 +02:00
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/;
2015-04-30 20:42:43 +02:00
license = licenses.tcltk;
platforms = platforms.all;
maintainers = with maintainers; [ lovek323 wkennington ];
2013-06-30 00:39:32 +02:00
};
}