Merge pull request from henrytill/mozart-fix

mozart: fix tcl/tk issues and clean up
This commit is contained in:
Arseniy Seroka 2015-10-06 02:05:51 +03:00
commit b3796cd0e7
2 changed files with 26 additions and 15 deletions
pkgs/development/compilers/mozart

View File

@ -1,11 +1,12 @@
{ stdenv, fetchurl, bash, makeWrapper, coreutils, emacs, tcl, tk, boost, gmp, cacert }: { stdenv, fetchurl, boost, emacs, gmp, makeWrapper
, tcl-8_5, tk-8_5
assert stdenv.isLinux; }:
let let
version = "2.0.0"; version = "2.0.0";
in
stdenv.mkDerivation { in stdenv.mkDerivation {
name = "mozart-binary-${version}"; name = "mozart-binary-${version}";
src = fetchurl { src = fetchurl {
@ -14,7 +15,15 @@ stdenv.mkDerivation {
}; };
libPath = stdenv.lib.makeLibraryPath 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; builder = ./builder.sh;

View File

@ -12,13 +12,15 @@ mv mozart*linux/share/* $out/share
patchShebangs $out patchShebangs $out
for f in $out/bin/*; do for f in $out/bin/*; do
b=$(basename $f) b=$(basename $f)
if [ $b == "ozemulator" ] || [ $b == "ozwish" ]; then
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ if [ $b == "ozemulator" ] || [ $b == "ozwish" ]; then
--set-rpath $libPath \ patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$f --set-rpath $libPath \
continue; $f
fi continue;
wrapProgram $f \ fi
--set OZHOME $out
wrapProgram $f --set OZHOME $out \
--set TK_LIBRARY $TK_LIBRARY
done done