From 55a64a5ddb099cf3af4115ee80bfd26553022533 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Sun, 26 Apr 2015 20:55:07 -0700 Subject: [PATCH] tcl/tk: Tie versioning together and propagate --- pkgs/development/interpreters/tcl/default.nix | 24 ++++++++++++------- pkgs/development/libraries/tk/default.nix | 10 ++++---- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/pkgs/development/interpreters/tcl/default.nix b/pkgs/development/interpreters/tcl/default.nix index 913c73f01f36..aa3836399ba5 100644 --- a/pkgs/development/interpreters/tcl/default.nix +++ b/pkgs/development/interpreters/tcl/default.nix @@ -1,10 +1,13 @@ { stdenv, fetchurl }: - -stdenv.mkDerivation { - name = "tcl-8.6.4"; +let + release = "8.6"; +in +stdenv.mkDerivation rec { + name = "tcl-${version}"; + version = "${release}.4"; src = fetchurl { - url = mirror://sourceforge/tcl/tcl8.6.4-src.tar.gz; + url = "mirror://sourceforge/tcl/tcl${version}-src.tar.gz"; sha256 = "13cwa4bc85ylf5gfj9vk182lvgy60qni3f7gbxghq78wk16djvly"; }; @@ -12,16 +15,19 @@ stdenv.mkDerivation { postInstall = '' 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"; homepage = http://www.tcl.tk/; - license = stdenv.lib.licenses.tcltk; + license = licenses.tcltk; + platforms = platforms.all; }; - passthru = { - libdir = "lib/tcl8.5"; + passthru = rec { + inherit release version; + libPrefix = "tcl${release}"; + libdir = "lib/${libPrefix}"; }; } diff --git a/pkgs/development/libraries/tk/default.nix b/pkgs/development/libraries/tk/default.nix index e44514d5abf1..5f07befcfa54 100644 --- a/pkgs/development/libraries/tk/default.nix +++ b/pkgs/development/libraries/tk/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, pkgconfig, tcl, libXft, fontconfig }: stdenv.mkDerivation { - name = "tk-8.6.4"; + name = "tk-${tcl.version}"; src = fetchurl { - url = "mirror://sourceforge/tcl/tk8.6.4-src.tar.gz"; + url = "mirror://sourceforge/tcl/tk${tcl.version}-src.tar.gz"; sha256 = "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88"; }; @@ -25,8 +25,10 @@ stdenv.mkDerivation { inherit tcl; - passthru = { - libPrefix = "tk8.6"; + passthru = rec { + inherit (tcl) release version; + libPrefix = "tk${tcl.release}"; + libdir = "lib/${libPrefix}"; }; meta = {