mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 16:19:44 +01:00
home-environment: use makeBinPath for activation PATH
This commit is contained in:
parent
c144580c98
commit
b9f49cee45
1 changed files with 8 additions and 4 deletions
|
@ -243,16 +243,20 @@ in
|
||||||
abort ("Dependency cycle in activation script: "
|
abort ("Dependency cycle in activation script: "
|
||||||
+ builtins.toJSON sortedCommands);
|
+ builtins.toJSON sortedCommands);
|
||||||
|
|
||||||
|
# Programs that always should be available on the activation
|
||||||
|
# script's PATH.
|
||||||
|
activationBinPaths = lib.makeBinPath [
|
||||||
|
pkgs.bash
|
||||||
|
pkgs.coreutils
|
||||||
|
];
|
||||||
|
|
||||||
sf = pkgs.writeText "activation-script" ''
|
sf = pkgs.writeText "activation-script" ''
|
||||||
#!${pkgs.stdenv.shell}
|
#!${pkgs.stdenv.shell}
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# This code explicitly requires GNU Core Utilities and Bash.
|
export PATH="${activationBinPaths}:$PATH"
|
||||||
# We therefore need to ensure they are prioritized over any
|
|
||||||
# other similarly named tools on the system.
|
|
||||||
export PATH="${pkgs.coreutils}/bin:${pkgs.bash}/bin:$PATH"
|
|
||||||
|
|
||||||
. ${./lib-bash/color-echo.sh}
|
. ${./lib-bash/color-echo.sh}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue