From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org
Subject: Re: thesis: guixsd should provide /usr/bin/env
Date: Thu, 19 Nov 2015 17:07:16 +0100 [thread overview]
Message-ID: <87h9ki9dmz.fsf@gnu.org> (raw)
In-Reply-To: <874mgmti7b.fsf@igalia.com> (Andy Wingo's message of "Mon, 16 Nov 2015 09:19:20 +0000")
Andy Wingo <wingo@igalia.com> skribis:
> I think GuixSD should follow NixOS's lead and provide /usr/bin/env. The
> reason is to support scripts that can run either on GuixSD or on some
> other system. For example instead of:
>
> #!/bin/bash
>
> we can do
>
> #!/usr/bin/env bash
>
> So we just need /usr/bin/env in the root and nothing else.
In ~8 years of NixOS and then GuixSD, I’ve lived without /usr/bin/env.
I use #!/bin/sh in scripts I write, which is known to be Bash on GuixSD.
But I don’t write so many throwaway scripts, and when I do, it’s either
Guile or Bash.
On IRC, Mark pointed out that, if /usr/bin/env were available by
default, then scripts or generated scripts may more often end up relying
on /usr/bin/env rather that precisely specify what interpreter they
need, which would partly defeat the point of all this.
My current inclination would be to not provide /usr/bin/env by default,
and instead let users add it if they want to, either using the
sledgehammer Ricardo suggests ;-), or simply with:
ln -s /run/current-system/profile/bin/env /usr/bin/env
We could document it, and/or even add a switch in ‘operating-system’ to
do that.
How does that sound?
> Alternately, I am not sure if this would work but we could make a form
> of "guix environment" which populates a profile that is mounted at /usr
> in a container. That would allow many more non-Guix tools to run.
Technically ‘guix environment --container’ could create /usr, just like
it creates /bin/sh. Not sure if it’s a good idea, though.
Thanks,
Ludo’.
next prev parent reply other threads:[~2015-11-19 16:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 9:19 thesis: guixsd should provide /usr/bin/env Andy Wingo
2015-11-17 6:48 ` Ricardo Wurmus
2015-11-19 16:07 ` Ludovic Courtès [this message]
2015-11-19 17:35 ` Andy Wingo
2015-11-20 14:00 ` Ludovic Courtès
2015-11-20 15:58 ` Andy Wingo
2016-02-17 7:31 ` 宋文武
2016-02-17 7:52 ` Jookia
2016-02-29 9:41 ` Ludovic Courtès
2016-02-29 9:46 ` Ludovic Courtès
2016-02-29 18:11 ` Christopher Allan Webber
2016-03-01 8:09 ` Andy Wingo
2016-03-01 8:11 ` Jookia
2016-03-03 17:00 ` Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h9ki9dmz.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=wingo@igalia.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.