From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: thesis: guixsd should provide /usr/bin/env Date: Tue, 17 Nov 2015 07:48:56 +0100 Message-ID: <8737w5nmsn.fsf@elephly.net> References: <874mgmti7b.fsf@igalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zya4h-0000ZL-1P for guix-devel@gnu.org; Tue, 17 Nov 2015 01:49:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zya4c-00025Q-TS for guix-devel@gnu.org; Tue, 17 Nov 2015 01:49:06 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:24284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zya4c-00025M-LW for guix-devel@gnu.org; Tue, 17 Nov 2015 01:49:02 -0500 In-reply-to: <874mgmti7b.fsf@igalia.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andy Wingo Cc: guix-devel@gnu.org Andy Wingo writes: > 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. > > 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. > > WDYT? I just did this on GuixSD: sudo -E guix package -p /usr -i bash coreutils Now I have /usr/bin/env and /usr/bin/bash. I don’t think I needed it before, though. “guix environment” is probably not the appropriate tool for this. I think it’s better to do this explicitly with profiles than to treat /usr/bin/env somehow specially. Providing /usr/bin/env doesn’t necessarily help — one would still have to have an interpreter installed in an active profile. ~~ Ricardo