lol

ocaml-re2: add initial version (112.06.00) to the system

+72
+17
pkgs/development/ocaml-modules/re2/Makefile.patch
··· 1 + --- ./lib/Makefile 2014-11-18 08:16:19.000000000 -0800 2 + +++ ./lib/Makefile 2015-05-23 14:48:31.000000000 -0700 3 + @@ -6,12 +6,12 @@ 4 + all: libre2_stubs.a dllre2_stubs.so 5 + 6 + dllre2_stubs.so libre2_stubs.a: stubs.o $(LIBRE2) 7 + - ocamlmklib -oc re2_stubs stubs.o $(LIBRE2) -lstdc++ 8 + + ocamlmklib -oc re2_stubs stubs.o $(LIBRE2) -lc++ 9 + rm libre2_stubs.a # ocamlmklib just includes $(LIBRE2) inside the stubs archive 10 + cp $(LIBRE2) libre2_stubs.a && ar r libre2_stubs.a stubs.o 11 + 12 + stubs.o: stubs.cpp stubs.h util.h enum_x_macro.h 13 + - g++ -O2 -DPIC -fPIC -g -pipe -DCAML_NAME_SPACE -Wall -I. -I../../../include \ 14 + + $(CXX) -O2 -DPIC -fPIC -g -pipe -DCAML_NAME_SPACE -Wall -I. -I../../../include \ 15 + -I$(RE2_HOME) -I$(ocaml-version-selected-include-path) -c stubs.cpp 16 + 17 + #stubs.o: %.o: %.cpp %.h
+29
pkgs/development/ocaml-modules/re2/default.nix
··· 1 + {stdenv, buildOcaml, fetchurl, ocaml, core, pa_ounit, pa_test, 2 + bin_prot, comparelib, sexplib, rsync}: 3 + 4 + buildOcaml rec { 5 + name = "re2"; 6 + version = "112.06.00"; 7 + 8 + minimumSupportedOcamlVersion = "4.00"; 9 + 10 + src = fetchurl { 11 + url = "https://github.com/janestreet/re2/archive/${version}.tar.gz"; 12 + sha256 = "a538765872363fcb67f12b95c07455a0afd68f5ae9008b59bb85a996d97cc752"; 13 + }; 14 + patches = if stdenv.isDarwin 15 + then [./Makefile.patch ./myocamlbuild.patch] 16 + else null; 17 + 18 + buildInputs = [ pa_ounit pa_test rsync ]; 19 + propagatedBuildInputs = [ core bin_prot comparelib sexplib ]; 20 + 21 + hasSharedObjects = true; 22 + 23 + meta = with stdenv.lib; { 24 + homepage = https://github.com/janestreet/re2; 25 + description = "OCaml bindings for RE2"; 26 + license = stdenv.lib.licenses.asl20; 27 + maintainers = [ maintainers.ericbmerritt ]; 28 + }; 29 + }
+24
pkgs/development/ocaml-modules/re2/myocamlbuild.patch
··· 1 + --- ./myocamlbuild.ml 2015-05-23 14:35:18.000000000 -0700 2 + +++ ./myocamlbuild.ml 2015-05-23 15:05:24.000000000 -0700 3 + @@ -626,16 +626,18 @@ 4 + rule "Generate lib/options.ml" 5 + ~prod:"lib/options.ml" 6 + ~deps:["lib/options.mlp"; "lib/enum_x_macro.h"] 7 + - (fun _ _ -> Cmd (S[A"gcc"; A"-E"; A"-P"; A"-x"; A"c"; 8 + + (fun _ _ -> Cmd (S[A"cc"; A"-E"; A"-P"; A"-x"; A"c"; 9 + P"lib/options.mlp"; A"-o"; P"lib/options.ml"])); 10 + 11 + flag ["ocaml"; "link"; "library"; "native"] (S[A"-cclib"; A"-Llib"; 12 + A"-cclib"; A"-lre2_stubs"; 13 + - A"-cclib"; A"-lstdc++"]); 14 + + A"-ccopt"; A"--stdlib=libc++"; 15 + + A"-cclib"; A"-lc++"]); 16 + flag ["ocaml"; "link"; "library"; "byte"] (S[A"-dllib"; A"dllre2_stubs.so"; 17 + A"-cclib"; A"-Llib"; 18 + A"-cclib"; A"-lre2_stubs"; 19 + - A"-cclib"; A"-lstdc++"]); 20 + + A"-ccopt"; A"--stdlib=libc++"; 21 + + A"-cclib"; A"-lc++"]); 22 + | _ -> 23 + () 24 +
+2
pkgs/top-level/all-packages.nix
··· 4315 4315 4316 4316 ounit = callPackage ../development/ocaml-modules/ounit { }; 4317 4317 4318 + re2 = callPackage ../development/ocaml-modules/re2 { }; 4319 + 4318 4320 tyxml = callPackage ../development/ocaml-modules/tyxml { }; 4319 4321 4320 4322 ulex = callPackage ../development/ocaml-modules/ulex { };