18 stdenv = llvmPackages.stdenv;
21 stdenv.mkDerivation rec {
24 name = "${pname}-${version}";
27 url = "https://github.com/mozart/mozart2/releases/download/v${version}/${name}-Source.zip";
28 sha256 = "1mad9z5yzzix87cdb05lmif3960vngh180s2mb66cj5gwh5h9dll";
31 # This is a workaround to avoid using sbt.
32 # I guess it is acceptable to fetch the bootstrapping compiler in binary form.
33 bootcompiler = fetchurl {
34 url = "https://github.com/layus/mozart2/releases/download/v2.0.0-beta.1/bootcompiler.jar";
35 sha256 = "1hgh1a8hgzgr6781as4c4rc52m2wbazdlw3646s57c719g5xphjz";
41 name = "remove-uses-of-deprecated-boost-apis.patch";
42 url = "https://github.com/mozart/mozart2/commit/4256d3a9122e1cbb01400a1807bdee66088ff274.patch";
43 hash = "sha256-AnOrBnxoCxqis+RdCsq8EKBg//jcNHSOFYUvf7vh+Hc=";
48 cp ${bootcompiler} bootcompiler/bootcompiler.jar
58 "-DBoost_USE_STATIC_LIBS=OFF"
59 "-DMOZART_BOOST_USE_STATIC_LIBS=OFF"
60 # We are building with clang, as nix does not support having clang and
61 # gcc together as compilers and we need clang for the sources generation.
62 # However, clang emits tons of warnings about gcc's atomic-base library.
63 "-DCMAKE_CXX_FLAGS=-Wno-braced-scalar-init"
67 wrapProgram $out/bin/oz --set OZEMACS ${emacs}/bin/emacs
80 description = "Open source implementation of Oz 3";
81 maintainers = with maintainers; [
85 license = licenses.bsd2;
86 homepage = "https://mozart.github.io";
87 platforms = platforms.all;
89 broken = stdenv.hostPlatform.isDarwin;