tclx: Leverage tcl.mkTclDerivation

This commit is contained in:
Andrew Brooks 2021-04-30 17:49:16 -05:00
parent e3ce7a6a5c
commit 3dc650b780

View file

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, tcl }:
{ lib, fetchurl, tcl }:
stdenv.mkDerivation rec {
tcl.mkTclDerivation rec {
name = "tclx-${version}.${patch}";
version = "8.4";
patch = "1";
@ -10,13 +10,11 @@ stdenv.mkDerivation rec {
sha256 = "1v2qwzzidz0is58fd1p7wfdbscxm3ip2wlbqkj5jdhf6drh1zd59";
};
passthru = {
libPrefix = ""; # Using tclx${version} did not work
};
buildInputs = [ tcl ];
configureFlags = [ "--with-tcl=${tcl}/lib" "--exec-prefix=\${prefix}" ];
# required in order for tclx to properly detect tclx.tcl at runtime
postInstall =
let tclXPkg = "tclx${version}";
tclXLib = "$prefix/lib/${tclXPkg}";
in "ln -s ${tclXLib} ${tclXLib}/${tclXPkg}";
meta = {
homepage = "http://tclx.sourceforge.net/";