diff --git a/pkgs/tools/misc/uudeview/default.nix b/pkgs/tools/misc/uudeview/default.nix index e66580f25ffb..3e8b7d494deb 100644 --- a/pkgs/tools/misc/uudeview/default.nix +++ b/pkgs/tools/misc/uudeview/default.nix @@ -10,6 +10,9 @@ stdenv.mkDerivation rec { buildInputs = [ tcl tk ]; hardeningDisable = [ "format" ]; configureFlags = [ "--enable-tk=${tk.dev}" "--enable-tcl=${tcl}" ]; + + # https://wiki.tcl.tk/3577 + patches = [ ./matherr.patch ]; postPatch = '' substituteInPlace tcl/xdeview --replace "exec uuwish" "exec $out/bin/uuwish" ''; diff --git a/pkgs/tools/misc/uudeview/matherr.patch b/pkgs/tools/misc/uudeview/matherr.patch new file mode 100644 index 000000000000..a93db7d7858d --- /dev/null +++ b/pkgs/tools/misc/uudeview/matherr.patch @@ -0,0 +1,19 @@ +diff --git a/tcl/uutcl.c b/tcl/uutcl.c +index f101f2ce52b..71c24688dc4 100644 +--- a/tcl/uutcl.c ++++ b/tcl/uutcl.c +@@ -48,14 +48,6 @@ + #include + #endif + +-/* +- * The following variable is a special hack that is needed in order for +- * Sun shared libraries to be used for Tcl. +- */ +- +-extern int matherr(); +-int *tclDummyMathPtr = (int *) matherr; +- + #include + #include + #include