unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Gary Johnson <lambdatronic@gmail.com>
To: Konrad Hinsen <konrad.hinsen@fastmail.net>
Cc: help-guix@gnu.org
Subject: Re: Scripting guix in guile (Konrad Hinsen)
Date: Fri, 06 Sep 2019 16:56:29 -0400	[thread overview]
Message-ID: <87ef0t87pe.fsf@gmail.com> (raw)
In-Reply-To: <m1blvx4xov.fsf@KHs-MacBook.fritz.box>

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 <konrad.hinsen@fastmail.net> 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

      parent reply	other threads:[~2019-09-06 20:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1897.1567596117.2071.help-guix@gnu.org>
2019-09-06  0:35 ` Scripting guix in guile (Konrad Hinsen) Gary Johnson
2019-09-06  8:48   ` Konrad Hinsen
2019-09-06 10:28     ` Tobias Geerinckx-Rice
2019-09-07 16:51       ` Konrad Hinsen
2019-09-06 20:56     ` Gary Johnson [this message]

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=87ef0t87pe.fsf@gmail.com \
    --to=lambdatronic@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=konrad.hinsen@fastmail.net \
    /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).