1 {stdenv, fetchurl, m4, ncurses, ocaml, writeText}:
4 ocaml_version = (builtins.parseDrvName ocaml.name).version;
9 name = "ocaml-findlib-${version}";
12 url = "http://download.camlcity.org/download/findlib-${version}.tar.gz";
13 sha256 = "1b6z5lylsjxxaifw2yc21cs0dc84zqi4q57sgwg4j8k3m60ivpxs";
16 buildInputs = [m4 ncurses ocaml];
18 patches = [ ./ldconf.patch ];
25 -mandir $out/share/man
26 -sitelib $out/lib/ocaml/${ocaml_version}/site-lib
27 -config $out/etc/findlib.conf
37 setupHook = writeText "setupHook.sh" ''
39 if test -d "''$1/lib/ocaml/${ocaml_version}/site-lib"; then
40 export OCAMLPATH="''${OCAMLPATH}''${OCAMLPATH:+:}''$1/lib/ocaml/${ocaml_version}/site-lib/"
42 export OCAMLFIND_DESTDIR="''$out/lib/ocaml/${ocaml_version}/site-lib/"
45 envHooks=(''${envHooks[@]} addOCamlPath)
49 homepage = http://projects.camlcity.org/projects/findlib.html;
50 description = "O'Caml library manager";
52 platforms = ocaml.meta.platforms;
54 stdenv.lib.maintainers.z77z