about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArie Middelkoop <amiddelk@gmail.com>2012-02-29 12:53:13 +0000
committerArie Middelkoop <amiddelk@gmail.com>2012-02-29 12:53:13 +0000
commit6e8c9ea906e80e6af78f1ec74213787dac0ad354 (patch)
treea7460b4b8837d382ad202f78d6f5e1717a22158e
parentd9f5e277a5471f1c03d14dced75738b62d323b56 (diff)
downloadnixlib-6e8c9ea906e80e6af78f1ec74213787dac0ad354.tar
nixlib-6e8c9ea906e80e6af78f1ec74213787dac0ad354.tar.gz
nixlib-6e8c9ea906e80e6af78f1ec74213787dac0ad354.tar.bz2
nixlib-6e8c9ea906e80e6af78f1ec74213787dac0ad354.tar.lz
nixlib-6e8c9ea906e80e6af78f1ec74213787dac0ad354.tar.xz
nixlib-6e8c9ea906e80e6af78f1ec74213787dac0ad354.tar.zst
nixlib-6e8c9ea906e80e6af78f1ec74213787dac0ad354.zip
ocaml-mode for emacs.
There seem to exist multiple (very old) versions.
I'm taking the one shipped with the ocaml compiler, which is hopefully the "most appropriate".

svn path=/nixpkgs/trunk/; revision=32688
-rw-r--r--pkgs/applications/editors/emacs-modes/ocaml/default.nix30
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 32 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;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 088ee4540446..6f37b48da689 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6672,6 +6672,8 @@ let
 
     haskellMode = callPackage ../applications/editors/emacs-modes/haskell { };
 
+    ocamlMode = callPackage ../applications/editors/emacs-modes/ocaml { };
+
     hol_light_mode = callPackage ../applications/editors/emacs-modes/hol_light { };
 
     htmlize = callPackage ../applications/editors/emacs-modes/htmlize { };