phodina via <[email protected]> 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 via email to