* Specify patches for packages with local source
@ 2017-06-29 21:00 Mekeor Melire
2017-07-02 19:10 ` Efraim Flashner
2017-07-03 7:41 ` Ludovic Courtès
0 siblings, 2 replies; 3+ messages in thread
From: Mekeor Melire @ 2017-06-29 21:00 UTC (permalink / raw)
To: help-guix
Is it possible to specify patches for packages with local source?
The `local-file` declaration doesn't allow a `patches` declaration.
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 …)))))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Specify patches for packages with local source
2017-06-29 21:00 Specify patches for packages with local source Mekeor Melire
@ 2017-07-02 19:10 ` Efraim Flashner
2017-07-03 7:41 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Efraim Flashner @ 2017-07-02 19:10 UTC (permalink / raw)
To: Mekeor Melire; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]
On Thu, Jun 29, 2017 at 11:00:18PM +0200, Mekeor Melire wrote:
> Is it possible to specify patches for packages with local source?
>
> The `local-file` declaration doesn't allow a `patches` declaration.
> 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 used to have a package with a patch. From my main GUIX_PACKAGE_PATH I
had the patch toplevel, although I suppose it shouldn't matter. To the
package module I added and import of (gnu packages) and for the patches
field I had the standard (patches (search-patches "my-patch.patch"))
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Specify patches for packages with local source
2017-06-29 21:00 Specify patches for packages with local source Mekeor Melire
2017-07-02 19:10 ` Efraim Flashner
@ 2017-07-03 7:41 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2017-07-03 7:41 UTC (permalink / raw)
To: Mekeor Melire; +Cc: help-guix
Hi,
Mekeor Melire <mekeor.melire@gmail.com> 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’.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-03 7:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-29 21:00 Specify patches for packages with local source Mekeor Melire
2017-07-02 19:10 ` Efraim Flashner
2017-07-03 7:41 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.