2017-02-15 01:13:22 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
|
|
|
, boost, gmp
|
2015-10-03 21:23:11 +00:00
|
|
|
, tcl-8_5, tk-8_5
|
2017-02-15 01:13:22 +00:00
|
|
|
, emacs
|
2015-10-03 21:23:11 +00:00
|
|
|
}:
|
2014-11-11 06:21:43 +00:00
|
|
|
|
2014-10-11 19:05:46 +00:00
|
|
|
let
|
|
|
|
version = "2.0.0";
|
2015-10-03 21:23:11 +00:00
|
|
|
|
2017-02-15 01:13:22 +00:00
|
|
|
binaries = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/mozart-oz/v${version}-alpha.0/mozart2-${version}-alpha.0+build.4105.5c06ced-x86_64-linux.tar.gz";
|
|
|
|
sha256 = "0rsfrjimjxqbwprpzzlmydl3z3aiwg5qkb052jixdxjyad7gyh5z";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2014-11-09 16:19:13 +00:00
|
|
|
name = "mozart-binary-${version}";
|
2014-10-11 19:05:46 +00:00
|
|
|
|
2017-02-13 17:24:22 +00:00
|
|
|
preferLocalBuild = true;
|
|
|
|
|
2017-02-15 01:13:22 +00:00
|
|
|
src = binaries."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
|
2009-12-29 14:57:01 +00:00
|
|
|
|
2014-10-11 19:05:46 +00:00
|
|
|
libPath = stdenv.lib.makeLibraryPath
|
2015-10-03 21:23:11 +00:00
|
|
|
[ stdenv.cc.cc
|
|
|
|
boost
|
|
|
|
gmp
|
|
|
|
tcl-8_5
|
|
|
|
tk-8_5
|
|
|
|
];
|
|
|
|
|
|
|
|
TK_LIBRARY = "${tk-8_5}/lib/tk8.5";
|
2014-10-11 19:05:46 +00:00
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
2009-12-29 14:57:01 +00:00
|
|
|
|
2017-02-15 01:13:22 +00:00
|
|
|
buildCommand = ''
|
|
|
|
mkdir $out
|
|
|
|
tar xvf $src -C $out --strip-components=1
|
|
|
|
|
|
|
|
for exe in $out/bin/{ozemulator,ozwish} ; do
|
|
|
|
patchelf --set-interpreter $(< $NIX_CC/nix-support/dynamic-linker) \
|
|
|
|
--set-rpath $libPath \
|
|
|
|
$exe
|
|
|
|
done
|
|
|
|
|
|
|
|
wrapProgram $out/bin/ozwish \
|
|
|
|
--set OZHOME $out \
|
|
|
|
--set TK_LIBRARY $TK_LIBRARY
|
|
|
|
|
|
|
|
wrapProgram $out/bin/ozemulator --set OZHOME $out
|
|
|
|
|
|
|
|
${stdenv.lib.optionalString (emacs != null) ''
|
|
|
|
wrapProgram $out/bin/oz --suffix PATH ":" ${stdenv.lib.makeBinPath [ emacs ]}
|
|
|
|
''}
|
|
|
|
|
|
|
|
sed -i $out/share/applications/oz.desktop \
|
|
|
|
-e "s,Exec=oz %u,Exec=$out/bin/oz %u,"
|
|
|
|
|
|
|
|
gzip -9n $out/share/mozart/elisp"/"*.elc
|
|
|
|
|
|
|
|
patchShebangs $out
|
|
|
|
'';
|
|
|
|
|
2014-10-11 19:05:46 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = http://www.mozart-oz.org/;
|
2014-11-13 13:50:49 +00:00
|
|
|
description = "Multiplatform implementation of the Oz programming language";
|
|
|
|
longDescription = ''
|
|
|
|
The Mozart Programming System combines ongoing research in
|
|
|
|
programming language design and implementation, constraint logic
|
|
|
|
programming, distributed computing, and human-computer
|
|
|
|
interfaces. Mozart implements the Oz language and provides both
|
|
|
|
expressive power and advanced functionality.
|
|
|
|
'';
|
2014-10-11 19:05:46 +00:00
|
|
|
license = licenses.mit;
|
2017-02-15 01:13:22 +00:00
|
|
|
platforms = attrNames binaries;
|
|
|
|
hydraPlatforms = [];
|
2014-10-11 19:05:46 +00:00
|
|
|
};
|
2009-12-29 14:57:01 +00:00
|
|
|
}
|