help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting guix in guile (Konrad Hinsen)


From: Gary Johnson
Subject: Re: Scripting guix in guile (Konrad Hinsen)
Date: Fri, 06 Sep 2019 16:56:29 -0400
User-agent: mu4e 1.2.0; emacs 26.3

Hi Konrad,

Fair enough. I was pleasantly surprised to discover that trick while
digging through the Guix manual several months ago. In the Guix info
pages, the documentation for it can be found under this path:

System Configuration -> Services -> Base Services -> extra-special-file

I'm not one of the Guix developers. I'm just a user, but my guess as to
why it isn't defined by default is that a big part of the GuixSD
mindset/philosophy AFAICT is to ensure that as little as possible is
installed under the usual FHS file tree (e.g., /usr, /bin, /sbin, /etc,
...). Instead as much of the OS as is technically feasible is installed
under /gnu/store.

This makes reproducing the same OS setup on a different machine a matter
of just running a handful of Guix commands on a blank hard drive
partition and feeding them your operating-system definition and package
manifest (both encoded as Scheme objects, of course). It also reduces
the likelihood of any file collisions when using the Guix package
manager on a foreign distro.

Since you're teaching a tutorial on Guix, you no doubt already grok all
of this, so my apologies for any redundancy here. In short, I just guess
/usr/bin/env isn't there because it doesn't need to be there for most
day-to-day Guix usage. If it is useful to a user, they can add the
extra-special-file service to their operating-system definition as per
my example.

That being said, if /usr/bin/env were added by default to the
special-files-service-type (which is part of %base-services), I'd
certainly not complain, and I think it would save quite a few users the
time that I spent digging through the manual for that particular
solution.

Good luck and happy hacking!
  Gary


Konrad Hinsen <address@hidden> writes:

> Hi Gary,
>
>> Just in case you hadn't thought of this yet, you can ensure that
>> /usr/bin/env exists on any Guix system by consing the following entry
>> onto the list of services under your operating-system definition.
>
> I hadn't thought of this for the simple reason that I didn't know about
> this mechanism. It looks very useful, thanks for the pointer!
>
> Is there any reason why this isn't defined by default? That would solve
> portability problems for lots of scripts, and I don't see any
> disadvantage caused by this link.
>
> Cheers,
>   Konrad



reply via email to

[Prev in Thread] Current Thread [Next in Thread]