unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: phodina <phodina@protonmail.com>
Cc: help-guix@gnu.org
Subject: Re: GuixSD distro detection during configuration
Date: Thu, 16 Sep 2021 11:52:06 +0200	[thread overview]
Message-ID: <878rzwq249.fsf@elephly.net> (raw)
In-Reply-To: <58ydBqqUPUZUmdHHddL6k4FS5rODq9aw5UY_N-FMJF_dLIoxmi8hvkjnCVhjYGMEgiQ5gbF4Va_R-B-wpdTx9wc8ePQ1VHTGTdjlslNapsM=@protonmail.com>


phodina via <help-guix@gnu.org> 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 
work around buggy distro detection.

(BTW: it’s called “Guix System”, not “GuixSD”.)

> I encountered the problem during build of realmd in the 
> configure.ac [1].
>
> Some distros have special file in /etc. So my first idea was to 
> use /etc/config.scm. However, this is not visible during the 
> package build.

It is also not necessary to have /etc/config.scm.  I, for example, 
have all my system configurations in a different directory.

> Therefore I went with the /gnu/store. This works but I'm 
> interested if there isn't even a better option.
> [1] 
> https://github.com/freedesktop/realmd/blob/master/configure.ac

Guix is often used on top of other distros, so the presence of 
/gnu/store is not enough to be sure that the distro is Guix 
System.


-- 
Ricardo


  reply	other threads:[~2021-09-16  9:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16  7:54 GuixSD distro detection during configuration phodina via
2021-09-16  9:52 ` Ricardo Wurmus [this message]
2021-09-16 10:24   ` phodina

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rzwq249.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=help-guix@gnu.org \
    --cc=phodina@protonmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).