From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Specify patches for packages with local source Date: Mon, 03 Jul 2017 09:41:00 +0200 Message-ID: <8737aermr7.fsf@gnu.org> References: <87d19mik65.fsf@gmail.com> 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]:48514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRvyl-0007v9-7F for help-guix@gnu.org; Mon, 03 Jul 2017 03:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRvyi-0001fr-49 for help-guix@gnu.org; Mon, 03 Jul 2017 03:41:07 -0400 In-Reply-To: <87d19mik65.fsf@gmail.com> (Mekeor Melire's message of "Thu, 29 Jun 2017 23:00:18 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Mekeor Melire Cc: help-guix Hi, Mekeor Melire skribis: > Is it possible to specify patches for packages with local source? > > The `local-file` declaration doesn't allow a `patches` declaration. Indeed, that=E2=80=99s annoying. I would suggest maybe using =E2=80=98computed-file=E2=80=99 in conjunction = with =E2=80=98local-file=E2=80=99 to apply the patch, but that means duplicating= the patching logic of origins, which is inconvenient. > Therefore, I'm guessing I'd have to use `origin`. But I'm not sure > whether either (method git-fetch) or (method url-fetch) allow to specify > a local path? > > The manual states: > > URL-FETCH from =E2=80=98(guix download)=E2=80=99 > download a file from the HTTP, HTTPS, or FTP URL > specified in the =E2=80=98uri=E2=80=99 field; > > But is "file://" also supported? Can I write something as follows? > > (define-public own-st > (package > (inherit st) > (source > (origin > (method url-fetch) > (uri "/path/to/st") ; like this =E2=86=90 ? > ;(uri "file:///path/to/st") ; or like this =E2=86=90 ? > (patches =E2=80=A6))))) I think so. The problem is that you wouldn=E2=80=99t want to write an abso= lute file name here, so it=E2=80=99s not convenient. Ludo=E2=80=99.