Hi David, Thanks for this. On 03/01/17 03:38, David Craven wrote: > * gnu/packages/ocaml.scm (ocaml-findlib)[arguments]: Move > ocaml-findlib-make-install.patch to phase and set ldconf="ignore" in > findlib.conf.in. > * gnu/local.mk (dist_patch_DATA): Remove old patch. The deletion of the patch file itself should also be documented. [...] > - #:phases (modify-phases %standard-phases > - (replace > - 'configure > - (lambda* (#:key inputs outputs #:allow-other-keys) > - (let ((out (assoc-ref outputs "out"))) > - (system* > - "./configure" > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'patch-findlib.conf.in > + (lambda _ > + (let ((port (open-file "findlib.conf.in" "w" #:encoding "utf-8"))) > + (format port "ldconf=\"ignore\"~%") > + (close-port port)) > + #t)) > + (add-after 'unpack 'patch-findlib-make-install > + (lambda _ > + (substitute* "src/findlib/Makefile" > + (("^.*topfind.*OCAML_CORE_STDLIB.*$") > + "\ttest $(INSTALL_TOPFIND) -eq 0 || cp topfind \"$(prefix)$(OCAML_SITELIB)\"\n")) > + #t)) > + (replace 'configure > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let ((out (assoc-ref outputs "out"))) > + (system* "./configure" > "-bindir" (string-append out "/bin") > "-config" (string-append out "/etc/ocamfind.conf") > "-mandir" (string-append out "/share/man") > "-sitelib" (string-append out "/lib/ocaml/site-lib") > "-with-toolbox"))))))) I had some trouble building downstream packages such as 'laby' after this patch. Do you see the same? > + (native-search-paths > + (list (search-path-specification > + (variable "OCAMLPATH") > + (files (list (string-append "lib/ocaml/site-lib")))))) This is unnecessary since this is already specified in the ocaml package definition, right? [...] On a somewhat related note, I've been getting around ocaml-findlib issues by adding this phase to downstream packages. WDYT? (add-before 'install 'setup-install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (destdir (string-append out "/lib/ocaml"))) (mkdir-p destdir) (setenv "OCAMLFIND_DESTDIR" destdir) (setenv "OCAMLFIND_LDCONF" (string-append destdir "/ld.conf")) #t)))))) I've been preparing a few ocaml packages, and it is getting to the point that it might be worth adding an ocaml-build-system, much like gnu-build-system except perhaps with a few tweaks such as the above (preliminary patch not adding anything ocaml/findlib-specific attached). OTOH, I'm quite cautious about my knowledge of the OCaml ecosystem, so I'm keen to hear others' opinions. Thanks, ben.