diff options
Diffstat (limited to 'pkgs/applications/editors/emacs-modes/ocaml/default.nix')
-rw-r--r-- | pkgs/applications/editors/emacs-modes/ocaml/default.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/applications/editors/emacs-modes/ocaml/default.nix b/pkgs/applications/editors/emacs-modes/ocaml/default.nix new file mode 100644 index 000000000000..1d81a0b7ff1e --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/ocaml/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, emacs, ocaml }: + +# this package installs the emacs-mode which +# resides in the ocaml compiler sources. + +let version = stdenv.lib.removePrefix "ocaml-" ocaml.name; +in stdenv.mkDerivation { + name = "ocaml-mode-${version}"; + inherit (ocaml) prefixKey src; + + # a quick configure to get the Makefile generated. Since + # we do not build the ocaml itself, we don't really + # need it to support any features. + configureFlags = [ "-no-tk" "-no-curses" "-no-pthread" ]; + + buildInputs = [ emacs ]; + dontBuild = true; + + installPhase = '' + cd emacs; + ensureDir "$out/share/emacs/site-lisp" "$out/bin" + EMACSDIR=$out/share/emacs/site-lisp make simple-install install-ocamltags + ''; + + meta = { + homepage = http://caml.inria.fr; + description = "OCaml mode package for Emacs"; + platforms = stdenv.lib.platforms.unix; + }; +} |