From: "(" <paren@disroot.org>
To: "dabbede@gmail.com" <dabbede@gmail.com>, <help-guix@gnu.org>
Subject: Re: Creating a package using two sources/origins
Date: Mon, 12 Dec 2022 22:43:04 +0000 [thread overview]
Message-ID: <CP07AL1WO41A.2H283M4ZH67ME@guix-framework> (raw)
In-Reply-To: <CAEwYQ4RBTdv=uRZiDSy6CqxAuK3Lx7ciA5nHHXQ0dWfuPjDQzg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]
Heya,
On Mon Dec 12, 2022 at 10:35 PM GMT, dabbede@gmail.com wrote:
> By looking into linux-libre package definition, I see no problem in
> downloading and patching the proper kernel source, however I don't
> understand how I am supposed to specify in the package definition that
> we need an additional source tree in the build process.
> What would you suggest? Using snippets or additional build-phases?
> Either way, I'm not skilled enough to download a compressed tar and
> unpack it in a reachable directory at the build stage. I'm only aware
> of the package's "origin" function to accomplish that. What is the
> best way to do the same in a snippet or phase?
What you need to do is combine ORIGIN with UNGEXP-NATIVE:
#~(modify-phases %standard-phases
(add-after 'unpack 'unpack-extra-sources
(lambda _
(copy-recursively #+(origin ...)
"extra-source-directory"))))
When the build script implementing the phases is... built, this lambda will look
like this:
(lambda _
(copy-recursively "/gnu/store/...-extra-sources"
"extra-source-directory"))
Roughly, the UNGEXP-NATIVE compiles the origin directory for the host
architecture, then substitutes itself for a string containing the output path of
the compiled store item.
-- (
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2022-12-12 22:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 22:35 Creating a package using two sources/origins dabbede
2022-12-12 22:43 ` ( [this message]
2022-12-12 23:58 ` dabbede
2022-12-13 6:17 ` (
2022-12-13 20:56 ` dabbede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CP07AL1WO41A.2H283M4ZH67ME@guix-framework \
--to=paren@disroot.org \
--cc=dabbede@gmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.