2018-07-21 00:44:44 +00:00
|
|
|
{ stdenv, emacs, ocaml }:
|
2012-02-29 12:53:13 +00:00
|
|
|
|
|
|
|
# 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.
|
2015-09-17 18:55:57 +00:00
|
|
|
configureFlags = (with stdenv.lib; optional (!(versionAtLeast version "4.02")) "-no-tk") ++
|
|
|
|
[ "-no-curses" "-no-pthread" ];
|
2012-02-29 12:53:13 +00:00
|
|
|
|
|
|
|
buildInputs = [ emacs ];
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cd emacs;
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p "$out/share/emacs/site-lisp" "$out/bin"
|
2012-02-29 12:53:13 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|