Julien Lepiller <jul...@lepiller.eu> skribis:

> +++ b/gnu/packages/patches/ocaml-janestreet-fix-libdir.patch
> @@ -0,0 +1,39 @@
> +This patch adds a --libdir option to opam-installer so it installs the plugin
> +in the specified directory rather than in the default one (ocaml's directory 
> in
> +the store, which is forbidden).
> +diff -aur package.pristine/Makefile package.new/Makefile
> +--- package.pristine/Makefile        2016-02-06 01:55:14.650150309 +0100
> ++++ package.new/Makefile     2016-02-06 01:57:56.012174364 +0100
> +@@ -29,26 +29,26 @@
> +     ocaml -I js-utils js-utils/gen_install.ml
> +
> + install: $(NAME).install
> +-    opam-installer -i --prefix $(PREFIX) $(NAME).install
> ++    opam-installer -i --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install
> +
> + uninstall: $(NAME).install
> +-    opam-installer -u --prefix $(PREFIX) $(NAME).install
> ++    opam-installer -u --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install

On second thought, I think it’d be simpler and more maintainable to do
this as a substitution in the snippet.

WDYT?

(It will also avoid ‘guix lint’ complaints about the patch file name not
matching the package name.  :-))

Ludo’.

Reply via email to