From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OBA3MAgUQ2GkSQEAgWs5BA (envelope-from ) for ; Thu, 16 Sep 2021 11:53:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YFfMKwgUQ2HmMgAAbx9fmQ (envelope-from ) for ; Thu, 16 Sep 2021 09:53:12 +0000 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 DBD4F14C19 for ; Thu, 16 Sep 2021 11:53:11 +0200 (CEST) Received: from localhost ([::1]:35562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQo4s-0000XU-HL for larch@yhetil.org; Thu, 16 Sep 2021 05:53:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQo4I-0000XL-TT for help-guix@gnu.org; Thu, 16 Sep 2021 05:52:35 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21117) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQo4C-0007MY-IX for help-guix@gnu.org; Thu, 16 Sep 2021 05:52:34 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1631785934; cv=none; d=zohomail.com; s=zohoarc; b=QmCHG1l6YZ/6xu+damrz7320fCtcoyrcAUcRhidw8xnZyRnxvQ8OpJ/JHwsF+++WsqeccRjLsk3DzQ7tC0b7XECc6Sm09EPPpB5i2HgHF5QxsrJ3z0aikjXISGfoYxSAh9GWvzNyVbgwiowVLI50TjIfGAquGVvYNzdVNt+TqzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631785934; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=8glDDhyLJReHN9KzIQY7WPPr40m3NBLmyo3AaB2ArUE=; b=bNAgwbFOdcHS4jhh7lOD5hEoUEbur5ML8Qn528S99AFSq0BtyLcJtesbUsNd5t1Pjng2DVelnIR6vfg7mnvNO0vdkqbMM9fYL5sd3GBCAsOrB0pbhgxVzU+JJoU64mGlyoOj4E2LPNPXXM8tvP7qC1RbDA3H3NkKYcYZbokF+ro= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1631785934; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=8glDDhyLJReHN9KzIQY7WPPr40m3NBLmyo3AaB2ArUE=; b=OPAc5R/xxeeJrxvvniPGZ5nIaDhk24vk6lRsx8OMbSMP7Q59ThKCkl9ig7UqPciP WS4T6BBPs1xueu9ofjt1jZJVkhQISSLqFXOugV0P2NrgDu/6Js6s2ze634Ez9n6IlEF E2nStaroOdBVdVmMjYSdL/k3ZpDQSlMW/H+lHF48= Received: from localhost (p54ad44d5.dip0.t-ipconnect.de [84.173.68.213]) by mx.zohomail.com with SMTPS id 163178592972824.89563535133675; Thu, 16 Sep 2021 02:52:09 -0700 (PDT) References: <58ydBqqUPUZUmdHHddL6k4FS5rODq9aw5UY_N-FMJF_dLIoxmi8hvkjnCVhjYGMEgiQ5gbF4Va_R-B-wpdTx9wc8ePQ1VHTGTdjlslNapsM=@protonmail.com> User-agent: mu4e 1.4.15; emacs 27.2 From: Ricardo Wurmus To: phodina Subject: Re: GuixSD distro detection during configuration In-reply-to: <58ydBqqUPUZUmdHHddL6k4FS5rODq9aw5UY_N-FMJF_dLIoxmi8hvkjnCVhjYGMEgiQ5gbF4Va_R-B-wpdTx9wc8ePQ1VHTGTdjlslNapsM=@protonmail.com> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Thu, 16 Sep 2021 11:52:06 +0200 Message-ID: <878rzwq249.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.com 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631785992; 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=8glDDhyLJReHN9KzIQY7WPPr40m3NBLmyo3AaB2ArUE=; b=Di/HoZhc+RElLf1tcov8R6xCpx2HbVNOEqUxpQxt/5NYhRD3qK8KR4iDWIWmNJ58gGNA5n rCdF1xkq+1cUg4Dw3UhKl61OXtb4cOASAARROw2S9BHYLaLwPyM/vdUglBdviJT+nlZcHz lWWPq2BnsjnKtZUsKEOlLj3cJbpUkm03tmM0Km+EpzmmpVha+gnBodhf+5VYcvG/wBP2pT nUtpy3CHDUMq5BJ+bjcD2P6e0kpufrwAvHRmFRX40z6Pzk03ysMl7RHM+ORxhLUTcj8y3s DAncCDkQoHy6cra3rFLWlYMT4aLZ8rFQIwDq/nKuaWP/hcBKdO4zhQAOO6mzKg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1631785992; a=rsa-sha256; cv=pass; b=oP4je6gb/nmFcYkp3dMXP96O3BLeXOqDLXQoM2iDWxOfhU+bRwe/jDNCvBYa5a8K4cOkFC Ud75I1ubZCLgksSOooeDovFUKfFz/02zksJfB9gOLQLqxY92QpNofuyeBrKqMm6FHoPfsa GcNm/O9Qxam/uy5VKZR5/CRs1km/Gt51TWfja8NRvDTh14xm6X3Ttp3W4zHZXYaL7iYbsS 1LrjovfWorOzJeelaj+4mKsYTWcomEy4x0XkS3WNQhl5aM8JI2DyEOyrTCbYijsql9/sRE cLS9WQZghKG3HEXCGaoEXpugCp2AAUeYrGnWqpIRKrIkq+cltc86aiRq8hd4uw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b="OPAc5R/x"; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.60 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b="OPAc5R/x"; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: DBD4F14C19 X-Spam-Score: -3.60 X-Migadu-Scanner: scn1.migadu.com X-TUID: YWOFbLfclgZO phodina via writes: > Hi, > what is the best way to detect the GuixSD OS during the build? Why is distro detection desirable? I often found myself trying to=20 work around buggy distro detection. (BTW: it=E2=80=99s called =E2=80=9CGuix System=E2=80=9D, not =E2=80=9CGuixS= D=E2=80=9D.) > I encountered the problem during build of realmd in the=20 > configure.ac [1]. > > Some distros have special file in /etc. So my first idea was to=20 > use /etc/config.scm. However, this is not visible during the=20 > package build. It is also not necessary to have /etc/config.scm. I, for example,=20 have all my system configurations in a different directory. > Therefore I went with the /gnu/store. This works but I'm=20 > interested if there isn't even a better option. > [1]=20 > https://github.com/freedesktop/realmd/blob/master/configure.ac Guix is often used on top of other distros, so the presence of=20 /gnu/store is not enough to be sure that the distro is Guix=20 System. --=20 Ricardo