all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "(" <paren@disroot.org>
To: "dabbede@gmail.com" <dabbede@gmail.com>
Cc: <help-guix@gnu.org>
Subject: Re: Creating a package using two sources/origins
Date: Tue, 13 Dec 2022 06:17:04 +0000	[thread overview]
Message-ID: <CP0GY728SKCX.1WGYAL6JLTUFG@guix-framework> (raw)
In-Reply-To: <CAEwYQ4TB570UgOTygoGUMrsxuqc-d6txNreYAZZPSOnB9bJMUg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1801 bytes --]

Heya,

On Mon Dec 12, 2022 at 11:58 PM GMT, dabbede@gmail.com wrote:
> (define-public my-help
>   (package
>     (inherit hello)
>     (name "my-help")
>     (arguments
>       #~(modify-phases %standard-phases
>       (add-after 'unpack 'unpack-extra-sources
>         (lambda _
>           (copy-recursively #+xenomai-origin
>                             "extra-source-directory")))))))

Nope, that's not quite correct. Your ARGUMENTS should look like this:

  (arguments
   (list #:phases
         #~(modify-phases %standard-phases
             (add-after 'unpack 'unpack-extra-sources
               (lambda _
                 (copy-recursively #+xenomai-origin
                                   "extra-source-directory"))))))

You can think of ARGUMENTS as a bunch of keyword arguments to pass to the
procedure that runs the build.

> Finally, if not too much out of scope, can you explain me why the #+
> ungexp can accept an origin object instead of a package? I assumed
> from the documentation that gexp where used only to reference among
> derivation of packages.

You've seen a ``.drv'' path being printed out by the CLI, right?  They contain
instructions to build a store item.  Packages are /lowered/ into DERIVATIONs,
but so are ORIGINs, LOCAL-FILEs, COMPUTED-FILEs, and any other kind of
"file-like object" or "lowerable object", such as the object you create with
FILE-APPEND.  The thing they all have it common is that they all have a lowering
procedure defined using DEFINE-GEXP-COMPILER; you can see a few examples of that
in ``guix/gexp.scm'' and ``guix/packages.scm''.  So, you can use UNGEXP and
UNGEXP-NATIVE on anything that has been DEFINE-GEXP-COMPILERed, and its
derivation will be built and its store path substituted.

    -- (

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-12-13  6:17 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 ` (
2022-12-12 23:58   ` dabbede
2022-12-13  6:17     ` ( [this message]
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=CP0GY728SKCX.1WGYAL6JLTUFG@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.