|
From: | Ricardo Wurmus |
Subject: | Re: GuixSD distro detection during configuration |
Date: | Thu, 16 Sep 2021 11:52:06 +0200 |
User-agent: | mu4e 1.4.15; emacs 27.2 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |