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.prik...@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