mozart: fix tcl/tk issues and clean up

This commit is contained in:
Henry Till 2015-10-03 17:23:11 -04:00
parent 85eb69ec5c
commit 7670739d21
2 changed files with 26 additions and 15 deletions

View File

@ -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;

View File

@ -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