From 6299baeb88cdeaa19275b0a2386e552e6347e93f Mon Sep 17 00:00:00 2001 From: Malcolm Matalka Date: Thu, 15 Nov 2012 23:19:32 +0100 Subject: [PATCH 1/2] Support installing topfind now --- pkgs/development/tools/ocaml/findlib/default.nix | 4 ++-- .../tools/ocaml/findlib/install_topfind.patch | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/tools/ocaml/findlib/install_topfind.patch diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix index 3170712b9baf..0291e47f6127 100644 --- a/pkgs/development/tools/ocaml/findlib/default.nix +++ b/pkgs/development/tools/ocaml/findlib/default.nix @@ -14,7 +14,8 @@ stdenv.mkDerivation { buildInputs = [m4 ncurses ocaml]; - patches = [ ./ldconf.patch ]; + patches = [ ./ldconf.patch ./install_topfind.patch ]; + patchFlags = "-p0"; dontAddPrefix=true; @@ -24,7 +25,6 @@ stdenv.mkDerivation { -mandir $out/share/man -sitelib $out/lib/ocaml/${ocaml_version}/site-lib -config $out/etc/findlib.conf - -no-topfind ) ''; diff --git a/pkgs/development/tools/ocaml/findlib/install_topfind.patch b/pkgs/development/tools/ocaml/findlib/install_topfind.patch new file mode 100644 index 000000000000..03eefb54cb14 --- /dev/null +++ b/pkgs/development/tools/ocaml/findlib/install_topfind.patch @@ -0,0 +1,12 @@ +--- src/findlib/Makefile ++++ src/findlib/Makefile +@@ -82,7 +82,7 @@ clean: + install: all + mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)" + mkdir -p "$(prefix)$(OCAMLFIND_BIN)" +- test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)" ++ test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_SITELIB)" + files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a META` && \ + cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)" + f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \ + From 5ff6be922416a738eed6480c24c75309fdb07ef3 Mon Sep 17 00:00:00 2001 From: Malcolm Matalka Date: Thu, 15 Nov 2012 23:21:14 +0100 Subject: [PATCH 2/2] Support installing findlib --- pkgs/development/tools/ocaml/findlib/default.nix | 1 - pkgs/development/tools/ocaml/findlib/install_topfind.patch | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix index 0291e47f6127..aee0040f8159 100644 --- a/pkgs/development/tools/ocaml/findlib/default.nix +++ b/pkgs/development/tools/ocaml/findlib/default.nix @@ -15,7 +15,6 @@ stdenv.mkDerivation { buildInputs = [m4 ncurses ocaml]; patches = [ ./ldconf.patch ./install_topfind.patch ]; - patchFlags = "-p0"; dontAddPrefix=true; diff --git a/pkgs/development/tools/ocaml/findlib/install_topfind.patch b/pkgs/development/tools/ocaml/findlib/install_topfind.patch index 03eefb54cb14..4729885bcefe 100644 --- a/pkgs/development/tools/ocaml/findlib/install_topfind.patch +++ b/pkgs/development/tools/ocaml/findlib/install_topfind.patch @@ -1,5 +1,5 @@ ---- src/findlib/Makefile -+++ src/findlib/Makefile +--- findlib-1.3.3/src/findlib/Makefile ++++ findlib-1.3.3/src/findlib/Makefile @@ -82,7 +82,7 @@ clean: install: all mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"