1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-01 04:23:34 +02:00

home-environment: explicitly use coreutils

Before we used dirname and readlink from the ambient environment,
which caused problems when they don't behave as expected.

Fixes #3516

(cherry picked from commit d7eee202e5)
This commit is contained in:
Robert Helgesson 2022-12-23 22:40:33 +01:00
parent 2bfcc6be42
commit 2d5b55d23d
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89

View File

@ -679,7 +679,6 @@ in
gnused
ncurses # For `tput`.
]
++ optional (config.nix.enable && config.nix.package != null) config.nix.package
++ config.home.extraActivationPath
)
+ (
@ -688,7 +687,7 @@ in
if config.nix.enable && config.nix.package != null then
":${config.nix.package}/bin"
else
":$(dirname $(readlink -m $(type -p nix-env)))"
":$(${pkgs.coreutils}/bin/dirname $(${pkgs.coreutils}/bin/readlink -m $(type -p nix-env)))"
)
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";