1 { lib, stdenv, fetchurl, makeWrapper
11 x86_64-linux = fetchurl {
12 url = "mirror://sourceforge/project/mozart-oz/v${version}-alpha.0/mozart2-${version}-alpha.0+build.4105.5c06ced-x86_64-linux.tar.gz";
13 sha256 = "0rsfrjimjxqbwprpzzlmydl3z3aiwg5qkb052jixdxjyad7gyh5z";
19 pname = "mozart-binary";
22 preferLocalBuild = true;
24 src = binaries.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
26 libPath = lib.makeLibraryPath
34 TK_LIBRARY = "${tk-8_5}/lib/tk8.5";
36 nativeBuildInputs = [ makeWrapper ];
40 tar xvf $src -C $out --strip-components=1
42 for exe in $out/bin/{ozemulator,ozwish} ; do
43 patchelf --set-interpreter $(< $NIX_CC/nix-support/dynamic-linker) \
44 --set-rpath $libPath \
48 wrapProgram $out/bin/ozwish \
50 --set TK_LIBRARY $TK_LIBRARY
52 wrapProgram $out/bin/ozemulator --set OZHOME $out
54 ${lib.optionalString (emacs != null) ''
55 wrapProgram $out/bin/oz --suffix PATH ":" ${lib.makeBinPath [ emacs ]}
58 sed -i $out/share/applications/oz.desktop \
59 -e "s,Exec=oz %u,Exec=$out/bin/oz %u,"
61 gzip -9n $out/share/mozart/elisp"/"*.elc
67 homepage = "http://www.mozart-oz.org/";
68 description = "Multiplatform implementation of the Oz programming language";
70 The Mozart Programming System combines ongoing research in
71 programming language design and implementation, constraint logic
72 programming, distributed computing, and human-computer
73 interfaces. Mozart implements the Oz language and provides both
74 expressive power and advanced functionality.
76 license = licenses.mit;
77 platforms = attrNames binaries;