[Nix-dev] patch for ocaml

roconnor at theorem.ca roconnor at theorem.ca
Thu Sep 2 18:18:24 CEST 2010


Here is a patch for ocaml that makes an include directory and symlinks 
ocaml's C header files into that directory.  By having an include 
directory it is automatically propogated as to NIX_CFLAGS_COMPILE for 
anyone who uses ocaml as a build input.

Question, should this patch be applied to the other derivations of ocaml 
found in this directory?

Index: pkgs/development/compilers/ocaml/3.11.1.nix
===================================================================
--- pkgs/development/compilers/ocaml/3.11.1.nix (revision 23377)
+++ pkgs/development/compilers/ocaml/3.11.1.nix (working copy)
@@ -24,6 +24,10 @@
      CAT=$(type -tp cat)
      sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
    '';
+  postBuild = ''
+    ensureDir $out/include
+    ln -s $out/lib/ocaml/caml $out/include/caml
+  '';

    meta = {
      homepage = http://caml.inria.fr/ocaml;


-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''



More information about the nix-dev mailing list