all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andy Tai <atai@atai.org>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: package definition question: referring to source files of another package?
Date: Mon, 4 Sep 2023 23:28:00 -0700	[thread overview]
Message-ID: <CAJsg1E_y4tWT8UWr0kbMsNn+Mw3uQDtz9iKdn6xyDosTQZ1uaQ@mail.gmail.com> (raw)
In-Reply-To: <2f8cbbd0e72a0d9c11696021cc92697d4c8807a9.camel@gmail.com>

Thanks. this is the pattern that seems to work, posted here for reference:
(define-public tensorflow-lite
  (package
    (name "tensorflow-lite")
     ...
    (arguments
     `(#:configure-flags

       (list ...
        (string-append "-Dgemmlowp_SOURCE_DIR=" (assoc-ref
%build-inputs "gemmlowp-src"))
...

    (inputs
     `(
       ("gemmlowp-src"
          ,(package-source gemmlowp))
...

where A is tensorflow-lite and B is gemmlowp

On Sat, Sep 2, 2023 at 9:18 PM Liliana Marie Prikler
<liliana.prikler@gmail.com> wrote:
> Am Samstag, dem 02.09.2023 um 20:35 -0700 schrieb Andy Tai:
> > 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?
> 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-05  6:29 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
2023-09-05  6:28   ` Andy Tai [this message]
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=CAJsg1E_y4tWT8UWr0kbMsNn+Mw3uQDtz9iKdn6xyDosTQZ1uaQ@mail.gmail.com \
    --to=atai@atai.org \
    --cc=guix-devel@gnu.org \
    --cc=liliana.prikler@gmail.com \
    /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.