From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 09/10] gnu: Add ocaml-js-build-tools. Date: Tue, 31 Jan 2017 10:22:44 +0100 Message-ID: <878tprfusb.fsf@gnu.org> References: <20170127221228.4370-1-julien@lepiller.eu> <20170127221228.4370-10-julien@lepiller.eu> <87inowgawq.fsf@gnu.org> <20170130220850.77b8e4a4@lepiller.eu> <87h94gkx0g.fsf@gnu.org> <20170130234808.654acf45@lepiller.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYUeK-0005Cs-6k for guix-devel@gnu.org; Tue, 31 Jan 2017 04:22:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYUeG-00025M-80 for guix-devel@gnu.org; Tue, 31 Jan 2017 04:22:52 -0500 In-Reply-To: <20170130234808.654acf45@lepiller.eu> (Julien Lepiller's message of "Mon, 30 Jan 2017 23:48:08 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Julien Lepiller Cc: guix-devel@gnu.org Julien Lepiller skribis: > I was replying to the correct message, but not with the correct patch. OK. :-) > From 96a8ec5f4ad68c14f49335bf58d27ef21c2419f7 Mon Sep 17 00:00:00 2001 > From: Julien Lepiller > Date: Fri, 27 Jan 2017 22:58:50 +0100 > Subject: [PATCH 1/2] gnu: Add ocaml-js-build-tools. > > * gnu/packages/ocaml.scm (ocaml-js-build-tools): New variable. > * gnu/packages/patches/ocaml-janestreet-fix-libdir.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. [...] > + (snippet > + `(let ((pattern (string-append "lib/" ,name))) > + ;; install.ml contains an invalid reference to the ppx fil= e and > + ;; propagates this error to the generated META file. It > + ;; looks for it in the "lib" directory, but it is installe= d in > + ;; "lib/ocaml/site-lib/package". This substitute does not= change > + ;; this file for non ppx packages. > + (substitute* "install.ml" > + ((pattern) > + (string-append "lib/ocaml/site-lib/" ,name))) > + ;; The standard Makefile would try to install janestreet m= odules > + ;; in OCaml's directory in the store, which is read-only. > + (substitute* "Makefile" > + (("--prefix") > + "--libdir $(LIBDIR) --prefix")))))) For =E2=80=98pattern=E2=80=99 to be a literal in the snippet, it needs to b= e moved it outside of the quasiquote: (let ((pattern (string-append "lib/" name))) `(begin (substitute* foo ((,pattern) =E2=80=A6)))) Also could you adjust the indentation of =E2=80=98substitute*=E2=80=99? OK with these changes. Thank you! Ludo=E2=80=99.