all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Andy Tai <atai@atai.org>, guix-devel@gnu.org
Subject: Re: package definition question: referring to source files of another package?
Date: Sun, 03 Sep 2023 06:18:54 +0200	[thread overview]
Message-ID: <2f8cbbd0e72a0d9c11696021cc92697d4c8807a9.camel@gmail.com> (raw)
In-Reply-To: <CAJsg1E9LJYgKWRDA4t6BRD82mcO2s8fMWYrGqB-5hYGbRDcP9Q@mail.gmail.com>

Am Samstag, dem 02.09.2023 um 20:35 -0700 schrieb Andy Tai:
> Hi, this is a question for writing package definition.
> 
> In some scenarios package A may refer to source files in package B.
> The question is, 
> 1. How to reference source directory of package B from within
> definition of package A?
> 2. can we even assume sources of Package B is available?   Normally
> if package B is an input (dependency) for package A, guix would
> ensure its installation directory is available, but not necessarily
> the source.  So is there something that has to be done to ensure
> Package B sources are somewhere?
You can use (package-source B) both within source and inputs.  The only
caveat here is that A and B should best be located in the same file;
things break badly if they are split and introduce cyclic references.
Note that the and part is more likely than you think, since the thunked
nature of inputs normally makes them harmless.

Cheers


  reply	other threads:[~2023-09-03  4:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-03  3:35 package definition question: referring to source files of another package? Andy Tai
2023-09-03  4:18 ` Liliana Marie Prikler [this message]
2023-09-05  6:28   ` Andy Tai
2023-09-03 12:12 ` Attila Lendvai

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=2f8cbbd0e72a0d9c11696021cc92697d4c8807a9.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=atai@atai.org \
    --cc=guix-devel@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.