static-nix-shell.mkYsh: manually inject PATH and XDG_DATA_DIRS to remove an extra layer of wrapping
This commit is contained in:
@@ -210,6 +210,27 @@ in rec {
|
||||
in mkShell ({
|
||||
inherit pkgsEnv pkgExprs;
|
||||
interpreter = lib.getExe' oils-for-unix "ysh";
|
||||
postConfigure = ''
|
||||
shellPreamble='
|
||||
{
|
||||
proc addToSearchPath(envName, appendValue) {
|
||||
var value = get(ENV, envName)
|
||||
if (value === null) {
|
||||
setglobal ENV[envName] = "$appendValue"
|
||||
} else {
|
||||
setglobal ENV[envName] = "$value:$appendValue"
|
||||
}
|
||||
}
|
||||
|
||||
addToSearchPath "PATH" "'"$append_PATH"'"
|
||||
addToSearchPath "XDG_DATA_DIRS" "'"$append_XDG_DATA_DIRS"'"
|
||||
|
||||
unset addToSearchPath
|
||||
}
|
||||
'
|
||||
unset append_PATH
|
||||
unset append_XDG_DATA_DIRS
|
||||
'';
|
||||
} // (removeAttrs attrs [ "oils-for-unix" "pkgs" ])
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user