[PATCH] gnu: zsh: Set default '$fpath'.

  • Done
  • quality assurance status badge
Details
2 participants
  • Brice Waegeneire
  • Ludovic Courtès
Owner
unassigned
Submitted by
Brice Waegeneire
Severity
normal
B
B
Brice Waegeneire wrote on 2 Jun 2020 15:20
(address . guix-patches@gnu.org)
20200602132048.24761-1-brice@waegenei.re
* gnu/packages/shells.scm (zsh)[arguments]: Add configure-flags
'disable-site-dir' and 'enable-additional-fpath'.
---
gnu/packages/shells.scm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 74d08e02bc..250c6d5576 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -441,8 +441,16 @@ history mechanism, job control and a C-like syntax.")
(base32
"09yyaadq738zlrnlh1hd3ycj1mv3q5hh4xl1ank70mjnqm6bbi6w"))))
(build-system gnu-build-system)
- (arguments `(#:configure-flags '("--with-tcsetpgrp" "--enable-pcre"
- "--enable-maildir-support")
+ (arguments `(#:configure-flags
+ `("--with-tcsetpgrp"
+ "--enable-pcre"
+ "--enable-maildir-support"
+ ;; share/zsh/site-functions isn't populated
+ "--disable-site-fndir"
+ ,(string-append
+ "--enable-additional-fpath="
+ "/usr/local/share/zsh/site-functions," ; for foreign OS
+ "/run/current-system/profile/share/zsh/site-functions"))
#:phases
(modify-phases %standard-phases
(add-before 'configure 'fix-sh
--
2.26.2
L
L
Ludovic Courtès wrote on 11 Jun 2020 19:08
(name . Brice Waegeneire)(address . brice@waegenei.re)(address . 41662@debbugs.gnu.org)
873671bkdo.fsf@gnu.org
Hi,

Brice Waegeneire <brice@waegenei.re> skribis:

Toggle quote (3 lines)
> * gnu/packages/shells.scm (zsh)[arguments]: Add configure-flags
> 'disable-site-dir' and 'enable-additional-fpath'.

[...]

Toggle quote (5 lines)
> + ,(string-append
> + "--enable-additional-fpath="
> + "/usr/local/share/zsh/site-functions," ; for foreign OS
> + "/run/current-system/profile/share/zsh/site-functions"))

/usr/local seems arbitrary. What if we omit it, will that break zsh on
foreign distros?

Ludo’.
B
B
Brice Waegeneire wrote on 11 Jun 2020 20:36
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 41662@debbugs.gnu.org)
67e3da74cc834bdb8dd04cb5fb2eeb3d@waegenei.re
Hello Ludo',

On 2020-06-11 17:08, Ludovic Courtès wrote:
Toggle quote (10 lines)
>> + ,(string-append
>> + "--enable-additional-fpath="
>> + "/usr/local/share/zsh/site-functions," ; for
>> foreign OS
>> +
>> "/run/current-system/profile/share/zsh/site-functions"))
>
> /usr/local seems arbitrary. What if we omit it, will that break zsh on
> foreign distros?

I let it there because it's a default[0] and because it was already
present
in our current zsh package, you can test that with “zsh -df -c 'echo
$fpath'”.
If I remember correctly I put it there for people using foreign OS who
still
wants some zsh functions from their host OS.


- Brice
L
L
Ludovic Courtès wrote on 12 Jun 2020 16:46
(name . Brice Waegeneire)(address . brice@waegenei.re)(address . 41662@debbugs.gnu.org)
87eeqk736f.fsf@gnu.org
Hi,

Brice Waegeneire <brice@waegenei.re> skribis:

Toggle quote (16 lines)
> On 2020-06-11 17:08, Ludovic Courtès wrote:
>>> + ,(string-append
>>> + "--enable-additional-fpath="
>>> + "/usr/local/share/zsh/site-functions," ; for
>>> foreign OS
>>> +
>>> "/run/current-system/profile/share/zsh/site-functions"))
>>
>> /usr/local seems arbitrary. What if we omit it, will that break zsh on
>> foreign distros?
>
> I let it there because it's a default[0] and because it was already
> present
> in our current zsh package, you can test that with “zsh -df -c 'echo
> $fpath'”.

OK, that makes sense to me.

Thanks,
Ludo’.
B
B
Brice Waegeneire wrote on 14 Jun 2020 15:33
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 41662-done@debbugs.gnu.org)
87r1uh7owd.fsf@waegenei.re
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (20 lines)
> Brice Waegeneire <brice@waegenei.re> skribis:
>
>> On 2020-06-11 17:08, Ludovic Courtès wrote:
>>>> + ,(string-append
>>>> + "--enable-additional-fpath="
>>>> + "/usr/local/share/zsh/site-functions," ; for
>>>> foreign OS
>>>> +
>>>> "/run/current-system/profile/share/zsh/site-functions"))
>>>
>>> /usr/local seems arbitrary. What if we omit it, will that break zsh on
>>> foreign distros?
>>
>> I let it there because it's a default[0] and because it was already
>> present
>> in our current zsh package, you can test that with “zsh -df -c 'echo
>> $fpath'”.
>
> OK, that makes sense to me.

Pushed as 4f6e6c0442368ac3fd7e95f1fc264671d9182c00.

- Brice
Closed
?