Heya, On Mon Dec 12, 2022 at 10:35 PM GMT, [email protected] 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.
-- (
signature.asc
Description: PGP signature
