diff options
| author | Lin Jian <me@linj.tech> | 2023-02-20 02:26:31 +0800 |
|---|---|---|
| committer | Lin Jian <me@linj.tech> | 2023-03-13 17:25:04 +0800 |
| commit | 8e2e741ab5bdea119a34013b1387eb3f281841cb (patch) | |
| tree | 883f74ab5bd15b82cdb004ec68f47f4e726d4048 /pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch | |
| parent | 2ed116f7a1724ba726a265f6f5ba1985c91ef833 (diff) | |
zsh: set environment variables in zshenv instead of zprofile
This patch fixes two issues:
1. The file in which environment variables are set is inconsistent.
- This file sets them in zprofile when programs.zsh.enable is not
set.
- Zsh module sets them in zshenv when programs.zsh.enable is set.
2. Setting environment variables in zprofile overrides what users set
in .zshenv. See these[1] home-manager[2] issues[3].
/etc/profile is also changed to /etc/set-environment. Here is a
comparison:
Using /etc/profile:
- Pros
- config.environment.shellInit is sourced in all zsh
- Cons
- config.environment.loginShellInit is also sourced in non-login zsh
- config.programs.bash.shellInit is also sourced in all zsh
- config.programs.bash.loginShellInit is also sourced in all zsh
Using /etc/set-environment:
- Pros
- config.programs.bash.shellInit is not sourced in any zsh
- config.programs.bash.loginShellInit is not sourced in any zsh
- Cons
- config.environment.shellInit is not sourced in any zsh
- config.environment.loginShellInit is not sourced in any zsh
[1]: https://github.com/nix-community/home-manager/issues/2751#issuecomment-1048682643
[2]: https://github.com/nix-community/home-manager/issues/2991
[3]: https://github.com/nix-community/home-manager/issues/3681#issuecomment-1436054233
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch')
0 files changed, 0 insertions, 0 deletions
