Message ID | 20190526020635.20780-1-me@tobias.gr |
---|---|
State | Accepted |
Headers | show |
Series | [bug#35910] services: Add ‘/usr/bin/env’ special file. | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | success | Successfully applied |
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
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’.
> 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
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