tcl/tk: Tie versioning together and propagate

This commit is contained in:
William A. Kennington III 2015-04-26 20:55:07 -07:00
parent 30f31c9afc
commit 55a64a5ddb
2 changed files with 21 additions and 13 deletions

View file

@ -1,10 +1,13 @@
{ stdenv, fetchurl }: { stdenv, fetchurl }:
let
stdenv.mkDerivation { release = "8.6";
name = "tcl-8.6.4"; in
stdenv.mkDerivation rec {
name = "tcl-${version}";
version = "${release}.4";
src = fetchurl { src = fetchurl {
url = mirror://sourceforge/tcl/tcl8.6.4-src.tar.gz; url = "mirror://sourceforge/tcl/tcl${version}-src.tar.gz";
sha256 = "13cwa4bc85ylf5gfj9vk182lvgy60qni3f7gbxghq78wk16djvly"; sha256 = "13cwa4bc85ylf5gfj9vk182lvgy60qni3f7gbxghq78wk16djvly";
}; };
@ -12,16 +15,19 @@ stdenv.mkDerivation {
postInstall = '' postInstall = ''
make install-private-headers make install-private-headers
ln -s $out/bin/tclsh8.6 $out/bin/tclsh ln -s $out/bin/tclsh${release} $out/bin/tclsh
''; '';
meta = { meta = with stdenv.lib; {
description = "The Tcl scription language"; description = "The Tcl scription language";
homepage = http://www.tcl.tk/; homepage = http://www.tcl.tk/;
license = stdenv.lib.licenses.tcltk; license = licenses.tcltk;
platforms = platforms.all;
}; };
passthru = { passthru = rec {
libdir = "lib/tcl8.5"; inherit release version;
libPrefix = "tcl${release}";
libdir = "lib/${libPrefix}";
}; };
} }

View file

@ -1,10 +1,10 @@
{ stdenv, fetchurl, pkgconfig, tcl, libXft, fontconfig }: { stdenv, fetchurl, pkgconfig, tcl, libXft, fontconfig }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "tk-8.6.4"; name = "tk-${tcl.version}";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/tcl/tk8.6.4-src.tar.gz"; url = "mirror://sourceforge/tcl/tk${tcl.version}-src.tar.gz";
sha256 = "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88"; sha256 = "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88";
}; };
@ -25,8 +25,10 @@ stdenv.mkDerivation {
inherit tcl; inherit tcl;
passthru = { passthru = rec {
libPrefix = "tk8.6"; inherit (tcl) release version;
libPrefix = "tk${tcl.release}";
libdir = "lib/${libPrefix}";
}; };
meta = { meta = {