From 3dc650b7800a0aa2290535b1ea97eaccf143f858 Mon Sep 17 00:00:00 2001 From: Andrew Brooks Date: Fri, 30 Apr 2021 17:49:16 -0500 Subject: [PATCH] tclx: Leverage tcl.mkTclDerivation --- pkgs/development/libraries/tclx/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/tclx/default.nix b/pkgs/development/libraries/tclx/default.nix index 85eae730575f..9582aabf654a 100644 --- a/pkgs/development/libraries/tclx/default.nix +++ b/pkgs/development/libraries/tclx/default.nix @@ -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/";