unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file.
@ 2019-05-26  2:06 Tobias Geerinckx-Rice
  2019-05-26  2:59 ` Tobias Geerinckx-Rice
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-05-26  2:06 UTC (permalink / raw)
  To: 35910

* gnu/services/base.scm (%base-services): Add ‘/usr/bin/env‘ to
special-files-service-type.
---

Guix,

I didn't even realise this was ‘missing’.  Is there any reason not to include it next to /bin/sh?

Sure, it's not pure, but then why provide /bin/sh when nowadays /usr/bin/env is both more common, more flexible,>

Feel free to gently enlighten me.

Kind regards,

T G-R

gnu/services/base.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index f709ca5519..444e48f137 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2382,6 +2383,8 @@ to handle."
 
         (service special-files-service-type
                  `(("/bin/sh" ,(file-append (canonical-package bash)
-                                            "/bin/sh"))))))
+                                            "/bin/sh"))
+                   ("/usr/bin/env" ,(file-append (canonical-package coreutils)
+                                                 "/usr/bin/env"))))))
 
 ;;; base.scm ends here
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file.
  2019-05-26  2:06 [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file Tobias Geerinckx-Rice
@ 2019-05-26  2:59 ` Tobias Geerinckx-Rice
  2019-05-29 21:06 ` Ludovic Courtès
  2019-06-16 20:48 ` Jeff Bauer
  2 siblings, 0 replies; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-05-26  2:59 UTC (permalink / raw)
  To: 35910

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

Tobias Geerinckx-Rice wrote:
> -                                            "/bin/sh"))))))
> +                                            "/bin/sh"))
> +                   ("/usr/bin/env" ,(file-append 
> (canonical-package coreutils)
> + 
> "/usr/bin/env"))))))

'course this won't work unless you, also, have the hunk

   #:use-module ((gnu packages base)
-                #:select (canonical-package glibc 
                  glibc-utf8-locales))
+                #:select (canonical-package coreutils glibc 
glibc-utf8-locales))

accidentally placed in another commit, which is unlikely.

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file.
  2019-05-26  2:06 [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file Tobias Geerinckx-Rice
  2019-05-26  2:59 ` Tobias Geerinckx-Rice
@ 2019-05-29 21:06 ` Ludovic Courtès
  2019-06-16 20:48 ` Jeff Bauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2019-05-29 21:06 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 35910

Hi,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> I didn't even realise this was ‘missing’.  Is there any reason not to include it next to /bin/sh?
>
> Sure, it's not pure, but then why provide /bin/sh when nowadays /usr/bin/env is both more common, more flexible,>
>
> Feel free to gently enlighten me.

The ‘special-files’ service, ‘extra-special-file’, and related
documentation, including a snippet for adding /usr/bin/env (info "(guix)
Base Services"), stem from this discussion:

  https://lists.gnu.org/archive/html/guix-devel/2017-02/msg00205.html

So, do people want to add /usr/bin/env by default?  :-)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file.
  2019-05-26  2:06 [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file Tobias Geerinckx-Rice
  2019-05-26  2:59 ` Tobias Geerinckx-Rice
  2019-05-29 21:06 ` Ludovic Courtès
@ 2019-06-16 20:48 ` Jeff Bauer
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Bauer @ 2019-06-16 20:48 UTC (permalink / raw)
  To: 35910

> So, do people want to add /usr/bin/env by default?  :-)

+1

This would provide some sanity in writing scripts that
could be portable between guix and non-guix systems.

I've used this in the past to write scripts what would
work between Linux and BSD systems.

-Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-16 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-26  2:06 [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file Tobias Geerinckx-Rice
2019-05-26  2:59 ` Tobias Geerinckx-Rice
2019-05-29 21:06 ` Ludovic Courtès
2019-06-16 20:48 ` Jeff Bauer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).