pypy3Packages.tkinter: enable and make no-op (#379087)
[NixPkgs.git] / pkgs / development / compilers / mozart / default.nix
blob41604a27a8adca09a43b2affaf6a05e7a72481d6
2   lib,
3   fetchurl,
4   fetchpatch,
5   cmake,
6   unzip,
7   makeWrapper,
8   boost,
9   llvmPackages,
10   gmp,
11   emacs,
12   jre_headless,
13   tcl,
14   tk,
17 let
18   stdenv = llvmPackages.stdenv;
21 stdenv.mkDerivation rec {
22   pname = "mozart2";
23   version = "2.0.1";
24   name = "${pname}-${version}";
26   src = fetchurl {
27     url = "https://github.com/mozart/mozart2/releases/download/v${version}/${name}-Source.zip";
28     sha256 = "1mad9z5yzzix87cdb05lmif3960vngh180s2mb66cj5gwh5h9dll";
29   };
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";
36   };
38   patches = [
39     ./patch-limits.diff
40     (fetchpatch {
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=";
44     })
45   ];
47   postConfigure = ''
48     cp ${bootcompiler} bootcompiler/bootcompiler.jar
49   '';
51   nativeBuildInputs = [
52     cmake
53     makeWrapper
54     unzip
55   ];
57   cmakeFlags = [
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"
64   ];
66   fixupPhase = ''
67     wrapProgram $out/bin/oz --set OZEMACS ${emacs}/bin/emacs
68   '';
70   buildInputs = [
71     boost
72     gmp
73     emacs
74     jre_headless
75     tcl
76     tk
77   ];
79   meta = with lib; {
80     description = "Open source implementation of Oz 3";
81     maintainers = with maintainers; [
82       layus
83       h7x4
84     ];
85     license = licenses.bsd2;
86     homepage = "https://mozart.github.io";
87     platforms = platforms.all;
88     # Trace/BPT trap: 5
89     broken = stdenv.hostPlatform.isDarwin;
90   };