diff --git a/pkgs/development/tools/ocaml/omake/default.nix b/pkgs/development/tools/ocaml/omake/default.nix new file mode 100644 index 000000000000..22e0d71af4d1 --- /dev/null +++ b/pkgs/development/tools/ocaml/omake/default.nix @@ -0,0 +1,37 @@ +{stdenv, fetchurl, makeWrapper, ocaml, ncurses}: +let + pname = "omake"; + version = "0.9.8.5-3"; + webpage = "http://omake.metaprl.org"; +in +stdenv.mkDerivation { + + name = "${pname}-${version}"; + + src = fetchurl { + url = "${webpage}/downloads/${pname}-${version}.tar.gz"; + sha256 = "1bfxbsimfivq0ar2g5fkzvr5ql97n5dg562pfyd29y4zyh4mwrsv"; + }; + patchFlags = "-p0"; + patches = [ ./omake-build-0.9.8.5.diff ./omake-lm_printf-gcc44.diff ]; + + buildInputs = [ ocaml makeWrapper ncurses ]; + + phases = "unpackPhase patchPhase buildPhase"; + buildPhase = '' + make bootstrap + make PREFIX=$out all + make PREFIX=$out install + ''; +# prefixKey = "-prefix "; +# +# configureFlags = if transitional then "--transitional" else "--strict"; +# +# buildFlags = "world.opt"; + + meta = { + description = "Omake build system"; + homepage = "${webpage}"; + license = "GPL"; + }; +} diff --git a/pkgs/development/tools/ocaml/omake/omake-build-0.9.8.5.diff b/pkgs/development/tools/ocaml/omake/omake-build-0.9.8.5.diff new file mode 100644 index 000000000000..b0a091e341cd --- /dev/null +++ b/pkgs/development/tools/ocaml/omake/omake-build-0.9.8.5.diff @@ -0,0 +1,11 @@ +--- src/exec/omake_exec.ml 2006-12-08 23:52:01.000000000 +0100 ++++ src/exec/omake_exec.ml 2009-04-15 22:19:07.000000000 +0200 +@@ -46,7 +46,7 @@ + open Omake_options + open Omake_command_type + +-external sync : unit -> unit = "caml_sync" ++(*external sync : unit -> unit = "caml_sync"*) + + module Exec = + struct diff --git a/pkgs/development/tools/ocaml/omake/omake-lm_printf-gcc44.diff b/pkgs/development/tools/ocaml/omake/omake-lm_printf-gcc44.diff new file mode 100644 index 000000000000..03665340f5f9 --- /dev/null +++ b/pkgs/development/tools/ocaml/omake/omake-lm_printf-gcc44.diff @@ -0,0 +1,22 @@ +--- src/libmojave-external/cutil/lm_printf.c.orig 2007-07-15 19:55:23.000000000 +0200 ++++ src/libmojave-external/cutil/lm_printf.c 2009-06-21 19:20:40.000000000 +0200 +@@ -144,3 +144,3 @@ + if(bufp != buffer) +- free(buffer); ++ free(bufp); + failwith("ml_print_string"); +@@ -149,3 +149,3 @@ + if(bufp != buffer) +- free(buffer); ++ free(bufp); + return v_result; +@@ -192,3 +192,3 @@ + if(bufp != buffer) +- free(buffer); ++ free(bufp); + failwith("ml_print_string"); +@@ -197,3 +197,3 @@ + if(bufp != buffer) +- free(buffer); ++ free(bufp); + return v_result; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4fcb03b8ec77..7d362e227a39 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3288,6 +3288,11 @@ let inherit fetchurl stdenv; }; + omake = import ../development/tools/ocaml/omake { + inherit stdenv fetchurl ocaml makeWrapper ncurses; + }; + + openocd = import ../development/tools/misc/openocd { inherit fetchurl stdenv libftdi; };