From 7670739d2138d30430e009ab2ae5e53219bd6ed5 Mon Sep 17 00:00:00 2001 From: Henry Till Date: Sat, 3 Oct 2015 17:23:11 -0400 Subject: [PATCH] mozart: fix tcl/tk issues and clean up --- pkgs/development/compilers/mozart/binary.nix | 21 ++++++++++++++------ pkgs/development/compilers/mozart/builder.sh | 20 ++++++++++--------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/pkgs/development/compilers/mozart/binary.nix b/pkgs/development/compilers/mozart/binary.nix index a420ef9c292c..ae040297313c 100644 --- a/pkgs/development/compilers/mozart/binary.nix +++ b/pkgs/development/compilers/mozart/binary.nix @@ -1,11 +1,12 @@ -{ stdenv, fetchurl, bash, makeWrapper, coreutils, emacs, tcl, tk, boost, gmp, cacert }: - -assert stdenv.isLinux; +{ stdenv, fetchurl, boost, emacs, gmp, makeWrapper +, tcl-8_5, tk-8_5 +}: let + version = "2.0.0"; -in -stdenv.mkDerivation { + +in stdenv.mkDerivation { name = "mozart-binary-${version}"; src = fetchurl { @@ -14,7 +15,15 @@ stdenv.mkDerivation { }; libPath = stdenv.lib.makeLibraryPath - [stdenv.cc.cc emacs tk tcl boost gmp]; + [ stdenv.cc.cc + boost + emacs + gmp + tcl-8_5 + tk-8_5 + ]; + + TK_LIBRARY = "${tk-8_5}/lib/tk8.5"; builder = ./builder.sh; diff --git a/pkgs/development/compilers/mozart/builder.sh b/pkgs/development/compilers/mozart/builder.sh index 75914121611d..b606d4c1bde9 100644 --- a/pkgs/development/compilers/mozart/builder.sh +++ b/pkgs/development/compilers/mozart/builder.sh @@ -12,13 +12,15 @@ mv mozart*linux/share/* $out/share patchShebangs $out for f in $out/bin/*; do - b=$(basename $f) - if [ $b == "ozemulator" ] || [ $b == "ozwish" ]; then - patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath $libPath \ - $f - continue; - fi - wrapProgram $f \ - --set OZHOME $out + b=$(basename $f) + + if [ $b == "ozemulator" ] || [ $b == "ozwish" ]; then + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath $libPath \ + $f + continue; + fi + + wrapProgram $f --set OZHOME $out \ + --set TK_LIBRARY $TK_LIBRARY done