16 let stdenv = llvmPackages.stdenv;
18 in stdenv.mkDerivation rec {
21 name = "${pname}-${version}";
24 url = "https://github.com/mozart/mozart2/releases/download/v${version}/${name}-Source.zip";
25 sha256 = "1mad9z5yzzix87cdb05lmif3960vngh180s2mb66cj5gwh5h9dll";
28 # This is a workaround to avoid using sbt.
29 # I guess it is acceptable to fetch the bootstrapping compiler in binary form.
30 bootcompiler = fetchurl {
31 url = "https://github.com/layus/mozart2/releases/download/v2.0.0-beta.1/bootcompiler.jar";
32 sha256 = "1hgh1a8hgzgr6781as4c4rc52m2wbazdlw3646s57c719g5xphjz";
38 name = "remove-uses-of-deprecated-boost-apis.patch";
39 url = "https://github.com/mozart/mozart2/commit/4256d3a9122e1cbb01400a1807bdee66088ff274.patch";
40 hash = "sha256-AnOrBnxoCxqis+RdCsq8EKBg//jcNHSOFYUvf7vh+Hc=";
45 cp ${bootcompiler} bootcompiler/bootcompiler.jar
48 nativeBuildInputs = [ cmake makeWrapper unzip ];
51 "-DBoost_USE_STATIC_LIBS=OFF"
52 "-DMOZART_BOOST_USE_STATIC_LIBS=OFF"
53 # We are building with clang, as nix does not support having clang and
54 # gcc together as compilers and we need clang for the sources generation.
55 # However, clang emits tons of warnings about gcc's atomic-base library.
56 "-DCMAKE_CXX_FLAGS=-Wno-braced-scalar-init"
60 wrapProgram $out/bin/oz --set OZEMACS ${emacs}/bin/emacs
73 description = "An open source implementation of Oz 3";
74 maintainers = with maintainers; [ layus h7x4 ];
75 license = licenses.bsd2;
76 homepage = "https://mozart.github.io";
77 platforms = platforms.all;
79 broken = stdenv.isDarwin;