mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
environment: Test how order of systemPath and profiles manifests
This commit is contained in:
parent
9b6f77200f
commit
bd0ed8599f
1 changed files with 18 additions and 0 deletions
|
@ -3,19 +3,37 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
environment.systemPath = mkMerge [
|
||||
(mkBefore [ "beforePath" ])
|
||||
[ "myPath" ]
|
||||
(mkAfter [ "afterPath" ])
|
||||
];
|
||||
|
||||
environment.profiles = mkMerge [
|
||||
(mkBefore [ "beforeProfile" ])
|
||||
[ "myProfile" ]
|
||||
(mkAfter [ "afterProfile" ])
|
||||
];
|
||||
|
||||
test = ''
|
||||
echo 'checking PATH' >&2
|
||||
env_path=$(bash -c 'source ${config.system.build.setEnvironment}; echo $PATH')
|
||||
|
||||
test "$env_path" = "${builtins.concatStringsSep ":" [
|
||||
"beforePath"
|
||||
"myPath"
|
||||
"beforeProfile/bin"
|
||||
"/homeless-shelter/.nix-profile/bin"
|
||||
"myProfile/bin"
|
||||
"/run/current-system/sw/bin"
|
||||
"/nix/var/nix/profiles/default/bin"
|
||||
"afterProfile/bin"
|
||||
"/usr/local/bin"
|
||||
"/usr/bin"
|
||||
"/usr/sbin"
|
||||
"/bin"
|
||||
"/sbin"
|
||||
"afterPath"
|
||||
]}"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue