From b9f49cee45c1fce22244ab5ff7819f07d785dac3 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Thu, 19 Oct 2017 22:42:35 +0200 Subject: [PATCH] home-environment: use makeBinPath for activation PATH --- modules/home-environment.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index 38049290f..1ea698813 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -243,16 +243,20 @@ in abort ("Dependency cycle in activation script: " + 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" '' #!${pkgs.stdenv.shell} set -eu set -o pipefail - # This code explicitly requires GNU Core Utilities and Bash. - # 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" + export PATH="${activationBinPaths}:$PATH" . ${./lib-bash/color-echo.sh}