From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id Qdb7B4+lemNuvQAAbAwnHQ (envelope-from ) for ; Sun, 20 Nov 2022 23:09:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GFBLBo+lemMBbAEAG6o9tA (envelope-from ) for ; Sun, 20 Nov 2022 23:09:19 +0100 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 A17D5CB5B for ; Sun, 20 Nov 2022 23:09:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owsUZ-0002GU-Jr; Sun, 20 Nov 2022 17:08:47 -0500 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 1owsUX-0002GM-Vp for guix-devel@gnu.org; Sun, 20 Nov 2022 17:08:46 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owsUV-0002l0-Ry for guix-devel@gnu.org; Sun, 20 Nov 2022 17:08:45 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 1b0a5736; Sun, 20 Nov 2022 22:08:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=C5N1pTueZ5bg JBT22XALdxS49zQcfJEMDWOnIh8r2Ps=; b=HU1YVO/PFpSJU+VQtUl3dKl1P4uP O+5CVnsUY9e1eW16JQ8TKA/Pgzn+mtNYKDyWy7xWt0Je/gcoX8W+gASFDRzGXF3U Kph0hUYElLHuTcX0UpeCEeV0GjtsbzSI7BjvdE5sat6YC8soI0yljx2UCYP78aon POOt3oG/ebgPvR9/z/ZeLmTdHTRvJXCriLDWHFSCM7f3xtHmhpxvYCXUa7efXSst SWceNqPgPOguTIpUMQPvwIurDbWsMTJLT780gblrxIT6swol0J4ZQ3hWqYy8pj3+ RB63WVcXcn7JC3GQ9NRbCvKNbWBdHwIOkSs0Qgi3pVy+2XU7wDzEdKeR7w== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 94c8599b (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sun, 20 Nov 2022 22:08:34 +0000 (UTC) Date: Sun, 20 Nov 2022 23:08:33 +0100 From: Julien Lepiller To: jgart Cc: Guix Devel Subject: Re: foreign-distro? Message-ID: <20221120230833.1220f1d8@sybil.lepiller.eu> In-Reply-To: <20221120145440.GB23557@dismail.de> References: <20221120145440.GB23557@dismail.de> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668982158; 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=j2CDkpfZjpicbMQcdgyznA+l8d93uINJS05oz453FsY=; b=jPFC4hlyzYkI3Jej84K9W4jtBlxJrczuSxXlEk0R0sJg/XyA4tntEVPVxJG5t+hPHjsxgr WO+HOvRHb8dIPVuAKbwDJIAyKizyJM8uLunVsdblLgvAu1SLTaFt6vPORlSTezPDtcb+X6 lgfKXnZyZEwEH6awbqIMaHwjXTllCEdQ6bI1ZK5eqln2Wtv653uT9lTJ+Nut3/W5cTxHDP ialWvi6kSiqCpZDx2lkI9L4mpQBbJQb/SsOyUxGRuLpEYJE1XUR/zRXkVqHqIRvLd9qdfu pg0z3zWQoCXTdc5EZzdskKwT2dMBbcznRT++zr/hctvdSAXlRKgAbSpkS9HvlQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668982158; a=rsa-sha256; cv=none; b=LSsp5t2lOJPGStdt54RiW7kKritpFWFJjYSmZ72VqC01N+D++XUHswz2B2nhttZ3AC6uMW XOYris7QJg/l4EouV+0P6QnNfkojbS0rweQKUeWfallH9hLqrSlluKqYPaXaxIm4U2q27N Asl18dTVo9ko6AFeERdDzBL5WCfDyWGBMwPH1vnbEIixmd4aJj46MJjnrWf8LWo6ir1pX2 d0GnJrOJjBPCbFUmleRzbEd2gSxgNgHzPcNjkBqU7tsiJXW6jb/gymfL6NKLm2PhPf3QCW +5tdyV2ktawLlqBdSj068CR3S5Kv5k+6w9Hu9sF8t/LkOx070OZXAld8kP82eg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b="HU1YVO/P"; dmarc=pass (policy=none) header.from=lepiller.eu; 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" X-Migadu-Spam-Score: -3.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b="HU1YVO/P"; dmarc=pass (policy=none) header.from=lepiller.eu; 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" X-Migadu-Queue-Id: A17D5CB5B X-Spam-Score: -3.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: gu79sU6qwPXB Le Sun, 20 Nov 2022 14:54:40 -0600, jgart a =C3=A9crit : > Does Guix have a declarative Guix API way of knowing if it is > installing a package into foreign distro versus Guix System? >=20 > I'm thinking of a function like `foreign-distro?`: >=20 > ``` > (define-public peek > (package > (name "peek") > ... > (inputs=20 > `(,@(if (foreign-distro?) `(("ffmpeg" ,ffmpeg)) '()))) > ``` >=20 > The above includes ffmpeg in the inputs only if installing peek on a > foreign distro. It could additionally patch the ffmpeg executable in > a peek package phases if foreign-distro? returns #t. >=20 > WDYT >=20 Guix doesn't have a notion of foreign distro, it's all in your head, and there's no difference between Guix System and other distros in the Guix package manager's point of view :) To be more specific, Guix only knows what you current system is (that's captured by %current-system). It's probably x86_64-linux right know. As you can see, there's no place in there to tell it whether you're on a foreign distro or not. Lastly, I don't think I would want to differentiate the two cases, especially since it would mean that somehow Guix packages depend on something external. There's this idea that Guix packages should somehow be self-sufficient.