From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6B2WCc7K9mT5NwEA9RJhRA:P1 (envelope-from ) for ; Tue, 05 Sep 2023 08:29:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6B2WCc7K9mT5NwEA9RJhRA (envelope-from ) for ; Tue, 05 Sep 2023 08:29:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 49A9731F7E for ; Tue, 5 Sep 2023 08:29:33 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=atai-org.20230601.gappssmtp.com header.s=20230601 header.b=mf5rRC3y; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693895374; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=FOK02NzKUVOIxO4K6dnNHa1LKJtu7f9fdoUXJEZyAOg=; b=luKFgLE1VCIHIxValyZKAQAOJ+7XL2wlWtixRyaEV6//7jV+CAkzwjhQrOOtnvYlKoOXA6 yZZ3KJTaXVV9GoeMEsBlDolSmLZNp0zs5cbbC4XT2CZfuIrL7ACfJd904whLu4Nzm8YxnD QM4Zbvs/eHP0OczuNIb0CRFfjGMEGMxo+hb+iECttmwgUiBlyzHdkNLVzFZFkaHKdnfa6k XabFzn/yAQhb+ISbDcaajBcWDDtxsgFT2ctn1NxSz0dgitqgMkW/XZhLGMc6yypWxzO5q0 l56CPUnkzbf9TQ8/ZsMGFhagx2czEWSDC/4SSZdJQPddtyLltetdeq7ncLKuFA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693895374; a=rsa-sha256; cv=none; b=i3jfTRW/6rvoi1blpFZiWPqk/0mYAqW/0PSvev4mriXsu255KDJj0zlpmmvU30H46zVNvD roDYWyB2NElxKfASi8VG2Zdf5PiIxMQQ2PE5D8R8oakmE3/Qd6bkRhXnEyERssZRPBoGkw pulMUc9p0DV4IRqbrnDf2piLdvmidPfof64ukfzj3/Rjsg8yO5Nn4BJyQlPdirgKbnzUhr mFgqbU3ROnVgirc46AbhePcmePneMAs2WUXdwmUAOsm07LQJSURt+heuOQxdUFUnWrYf28 3OkL/Yq/K/LFJ1HVyI8da77IyiBAZeCk7ZVHKzw5lMTyQpB/Vzwfd6jdJccRUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=atai-org.20230601.gappssmtp.com header.s=20230601 header.b=mf5rRC3y; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdPYM-0000Ky-0c; Tue, 05 Sep 2023 02:28:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdPYI-0000Kf-C1 for guix-devel@gnu.org; Tue, 05 Sep 2023 02:28:43 -0400 Received: from mail-oo1-xc31.google.com ([2607:f8b0:4864:20::c31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdPYE-0000uf-LX for guix-devel@gnu.org; Tue, 05 Sep 2023 02:28:41 -0400 Received: by mail-oo1-xc31.google.com with SMTP id 006d021491bc7-57355a16941so1453528eaf.2 for ; Mon, 04 Sep 2023 23:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atai-org.20230601.gappssmtp.com; s=20230601; t=1693895317; x=1694500117; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FOK02NzKUVOIxO4K6dnNHa1LKJtu7f9fdoUXJEZyAOg=; b=mf5rRC3yfEcdEWDc7GZBx+qDsqRG2fpX/7V1gMaqm/DrbPr3G0B14o8tMoWaQyYY1q SJCQPmUcssZh3aLz4RdzJtXS28TmXjqxCfkUZ+gEQz4hiMlUMGcHatfQ2TobLlHquSln 5EjV5vuipD99I+a0A31bPeXQaP6h1y8QoVDkKq6sfYjz1GA25HVgi5Z+QRJE2WEWm7iN Wsmr61jRwta1hZaSryBuGA0T1A81cT1gDGcwSzcrjO3KHa/2+SEMWiUjWkmSXfIUAN03 YHlrQpQYRwIA0BgEk7WBPbwd3je+VplRBl/bfVFQLOa4ZJ0s2CAf5qOTsKzplcFgQYNy z+iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693895317; x=1694500117; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FOK02NzKUVOIxO4K6dnNHa1LKJtu7f9fdoUXJEZyAOg=; b=gEQHjee9Q/tPPAzbDpG2SP9072P5kclQJ/SKXg9R380ZAiUbFQJg41ZFR09reS19CK uRZAzF1Ly0E/m1Wyib0hCP6eIgOADrzRA0zSCV5/iWsSxS9uJFSzaV4xU9lp0v7G7lNM b3goaFyugZNsdnySzXrj5U4Q3crW+DBfsuxXLkQzGrXoCCCqOtNnWYcQTEVqrxn+Z2bv hrm5Y7MNxXaa83/4tfMVIvTr/kVuWVjOzztffkKVGR8kxKlHuMKXZKJuz5TJZnBdFfEV lIItN+sQAzJaSCnGJOPqyv/vlJ4laF7IemrhymShJ+c6xODH6BwFdlT11OncXDLnycUu st3g== X-Gm-Message-State: AOJu0YzqlkTY/9CAijYK0PljfvI6TkAp2ttM9VQd1hu9CAByBwrLal1v 9Xw6U9aIjTX2pO35w608q+Y3I4aFhCor72n9BbVGJSuLqaittw== X-Google-Smtp-Source: AGHT+IERJJ2JV/H7zUb+Xhe3AqEQbREI8g8uKNg87+ZyaJvzn+XN0iY6kGupkfkYiHyWOurVMJ8UGffByHKwYiy+Wc8= X-Received: by 2002:a4a:3059:0:b0:571:2644:f307 with SMTP id z25-20020a4a3059000000b005712644f307mr9167825ooz.1.1693895317072; Mon, 04 Sep 2023 23:28:37 -0700 (PDT) MIME-Version: 1.0 References: <2f8cbbd0e72a0d9c11696021cc92697d4c8807a9.camel@gmail.com> In-Reply-To: <2f8cbbd0e72a0d9c11696021cc92697d4c8807a9.camel@gmail.com> From: Andy Tai Date: Mon, 4 Sep 2023 23:28:00 -0700 Message-ID: Subject: Re: package definition question: referring to source files of another package? To: Liliana Marie Prikler Cc: guix-devel@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::c31; envelope-from=lichengtai@gmail.com; helo=mail-oo1-xc31.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -7.97 X-Migadu-Queue-Id: 49A9731F7E X-Migadu-Spam-Score: -7.97 X-TUID: O6eRFQLFk7lx 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=3D" (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=E2=80=AFPM Liliana Marie Prikler 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