ber_metaocaml: (re)init at 104

+86
+84
pkgs/development/compilers/ocaml/ber-metaocaml-104.nix
··· 1 + { stdenv, fetchurl, ncurses, libX11, xproto, buildEnv }: 2 + 3 + let 4 + useX11 = stdenv.isi686 || stdenv.isx86_64; 5 + useNativeCompilers = stdenv.isi686 || stdenv.isx86_64 || stdenv.isMips; 6 + inherit (stdenv.lib) optionals optionalString; 7 + in 8 + 9 + stdenv.mkDerivation rec { 10 + 11 + name = "ber-metaocaml-${version}"; 12 + version = "104"; 13 + 14 + src = fetchurl { 15 + url = "http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04.0.tar.gz"; 16 + sha256 = "1pi2hdm9lxhn45qvfqfss1hpa4jijm14qgmrgajsadxqdiplhqyb"; 17 + }; 18 + 19 + metaocaml = fetchurl { 20 + url = "http://okmij.org/ftp/ML/ber-metaocaml-104.tar.gz"; 21 + sha256 = "1gmwlxairxqcmqa2r6kbf8b4dxc7pfhfbh48g1s14d3z20rj8nib"; 22 + }; 23 + 24 + # Needed to avoid a SIGBUS on the final executable on mips 25 + NIX_CFLAGS_COMPILE = if stdenv.isMips then "-fPIC" else ""; 26 + 27 + x11env = buildEnv { name = "x11env"; paths = [libX11 xproto];}; 28 + x11lib = x11env + "/lib"; 29 + x11inc = x11env + "/include"; 30 + 31 + prefixKey = "-prefix "; 32 + configureFlags = optionals useX11 [ "-x11lib" x11lib 33 + "-x11include" x11inc ]; 34 + 35 + dontStrip = true; 36 + buildInputs = [ncurses] ++ optionals useX11 [ libX11 xproto ]; 37 + installFlags = "-i"; 38 + installTargets = "install"; # + optionalString useNativeCompilers " installopt"; 39 + 40 + postConfigure = '' 41 + tar -xvzf $metaocaml 42 + cd ${name} 43 + make patch 44 + cd .. 45 + ''; 46 + buildPhase = '' 47 + make world 48 + make -i install 49 + 50 + make bootstrap 51 + make opt.opt 52 + make installopt 53 + mkdir -p $out/include 54 + ln -sv $out/lib/ocaml/caml $out/include/caml 55 + cd ${name} 56 + make all 57 + make install 58 + make install.opt 59 + cd .. 60 + ''; 61 + installPhase = ""; 62 + postBuild = '' 63 + ''; 64 + checkPhase = '' 65 + cd ${name} 66 + make test 67 + make test-compile 68 + make test-native 69 + cd .. 70 + ''; 71 + 72 + meta = with stdenv.lib; { 73 + homepage = "http://okmij.org/ftp/ML/index.html#ber-metaocaml"; 74 + license = with licenses; [ 75 + qpl /* compiler */ 76 + lgpl2 /* library */ 77 + ]; 78 + description = "Conservative extension of OCaml"; 79 + longDescription = '' 80 + A conservative extension of OCaml with the primitive type of code values, 81 + and three basic multi-stage expression forms: Brackets, Escape, and Run 82 + ''; 83 + }; 84 + }
+2
pkgs/top-level/all-packages.nix
··· 6260 6260 6261 6261 ber_metaocaml_003 = callPackage ../development/compilers/ocaml/ber-metaocaml-003.nix { }; 6262 6262 6263 + ber_metaocaml = callPackage ../development/compilers/ocaml/ber-metaocaml-104.nix { }; 6264 + 6263 6265 ocaml_make = callPackage ../development/ocaml-modules/ocamlmake { }; 6264 6266 6265 6267 ocaml-top = callPackage ../development/tools/ocaml/ocaml-top { };