diff --git a/pkgs/development/ocaml-modules/camlzip/default.nix b/pkgs/development/ocaml-modules/camlzip/default.nix index 9e991a811e6..03a6dbef23e 100644 --- a/pkgs/development/ocaml-modules/camlzip/default.nix +++ b/pkgs/development/ocaml-modules/camlzip/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation { patches = [ ./makefile.patch ]; + createFindlibDestdir = true; + postPatch = '' substitute ${./META} META --subst-var-by VERSION "${version}" substituteInPlace Makefile \ diff --git a/pkgs/development/ocaml-modules/camomile/0.7.3.nix b/pkgs/development/ocaml-modules/camomile/0.7.3.nix index b770b36abf6..12b816dec36 100644 --- a/pkgs/development/ocaml-modules/camomile/0.7.3.nix +++ b/pkgs/development/ocaml-modules/camomile/0.7.3.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { buildInputs = [ocaml findlib]; - #dontAddPrefix = true; + createFindlibDestdir = true; meta = { homepage = http://camomile.sourceforge.net/; diff --git a/pkgs/development/ocaml-modules/camomile/0.8.1.nix b/pkgs/development/ocaml-modules/camomile/0.8.1.nix index 8d9ab69dfc6..29ce5c59b44 100644 --- a/pkgs/development/ocaml-modules/camomile/0.8.1.nix +++ b/pkgs/development/ocaml-modules/camomile/0.8.1.nix @@ -15,7 +15,11 @@ stdenv.mkDerivation { buildInputs = [ocaml findlib]; - #dontAddPrefix = true; + preInstall = '' + ensureDir $OCAMLFIND_DESTDIR + ''; + + createFindlibDestdir = true; meta = { homepage = http://camomile.sourceforge.net/; diff --git a/pkgs/development/ocaml-modules/cryptgps/default.nix b/pkgs/development/ocaml-modules/cryptgps/default.nix index 63a25dd0b47..7379a62d424 100644 --- a/pkgs/development/ocaml-modules/cryptgps/default.nix +++ b/pkgs/development/ocaml-modules/cryptgps/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation { configurePhase = "true"; # Skip configure phase + createFindlibDestdir = true; + meta = { homepage = http://projects.camlcity.org/projects/cryptgps.html; description = "Cryptographic functions for OCaml"; diff --git a/pkgs/development/ocaml-modules/menhir/default.nix b/pkgs/development/ocaml-modules/menhir/default.nix index 4d92cda5553..ea706ef511f 100644 --- a/pkgs/development/ocaml-modules/menhir/default.nix +++ b/pkgs/development/ocaml-modules/menhir/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation { configurePhase = "true"; # Skip configure + createFindlibDestdir = true; + preBuild = '' #Fix makefiles. RM=$(type -p rm) diff --git a/pkgs/development/ocaml-modules/ounit/default.nix b/pkgs/development/ocaml-modules/ounit/default.nix index 62bf7f89c49..b6d14383d5e 100644 --- a/pkgs/development/ocaml-modules/ounit/default.nix +++ b/pkgs/development/ocaml-modules/ounit/default.nix @@ -23,6 +23,8 @@ stdenv.mkDerivation { checkTarget = "test"; + createFindlibDestdir = true; + meta = { homepage = http://www.xs4all.nl/~mmzeeman/ocaml/; description = "Unit test framework for OCaml"; diff --git a/pkgs/development/ocaml-modules/pcre/default.nix b/pkgs/development/ocaml-modules/pcre/default.nix index d16093a6feb..fdc527791c0 100644 --- a/pkgs/development/ocaml-modules/pcre/default.nix +++ b/pkgs/development/ocaml-modules/pcre/default.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation { buildInputs = [pcre ocaml findlib]; + createFindlibDestdir = true; + configurePhase = "true"; # Skip configure phase meta = { diff --git a/pkgs/development/ocaml-modules/sqlite3/default.nix b/pkgs/development/ocaml-modules/sqlite3/default.nix index d542cfe14f6..9b477fed851 100644 --- a/pkgs/development/ocaml-modules/sqlite3/default.nix +++ b/pkgs/development/ocaml-modules/sqlite3/default.nix @@ -23,6 +23,8 @@ stdenv.mkDerivation { ensureDir $out/bin ''; + createFindlibDestdir = true; + meta = { homepage = "http://ocaml.info/home/ocaml_sources.html#ocaml-sqlite3"; description = "OCaml bindings to the SQLite 3 database access library"; diff --git a/pkgs/development/ocaml-modules/ssl/default.nix b/pkgs/development/ocaml-modules/ssl/default.nix index 56ac189b7ba..9a495002f1d 100644 --- a/pkgs/development/ocaml-modules/ssl/default.nix +++ b/pkgs/development/ocaml-modules/ssl/default.nix @@ -19,6 +19,8 @@ stdenv.mkDerivation { configureFlags = "--disable-ldconf"; + createFindlibDestdir = true; + meta = { homepage = http://savonet.rastageeks.org/; description = "OCaml bindings for libssl "; diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix index 9a2a6b0d94a..9a5b9acbef9 100644 --- a/pkgs/development/tools/ocaml/findlib/default.nix +++ b/pkgs/development/tools/ocaml/findlib/default.nix @@ -40,6 +40,9 @@ stdenv.mkDerivation { export OCAMLPATH="''${OCAMLPATH}''${OCAMLPATH:+:}''$1/lib/ocaml/${ocaml_version}/site-lib/" fi export OCAMLFIND_DESTDIR="''$out/lib/ocaml/${ocaml_version}/site-lib/" + if test -n $createFindlibDestdir; then + ensureDir $OCAMLFIND_DESTDIR + fi } envHooks=(''${envHooks[@]} addOCamlPath)