[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Specify patches for packages with local source
From: |
Ludovic Courtès |
Subject: |
Re: Specify patches for packages with local source |
Date: |
Mon, 03 Jul 2017 09:41:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hi,
Mekeor Melire <address@hidden> skribis:
> Is it possible to specify patches for packages with local source?
>
> The `local-file` declaration doesn't allow a `patches` declaration.
Indeed, that’s annoying.
I would suggest maybe using ‘computed-file’ in conjunction with
‘local-file’ 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 ‘(guix download)’
> download a file from the HTTP, HTTPS, or FTP URL
> specified in the ‘uri’ 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 ← ?
> ;(uri "file:///path/to/st") ; or like this ← ?
> (patches …)))))
I think so. The problem is that you wouldn’t want to write an absolute
file name here, so it’s not convenient.
Ludo’.