static-nix-shell.mkZsh: implement shellPreamble to reduce wrapping
This commit is contained in:
@@ -271,9 +271,16 @@ in rec {
|
|||||||
pkgsEnv = [ zsh ] ++ (builtins.attrValues pkgsAsAttrs);
|
pkgsEnv = [ zsh ] ++ (builtins.attrValues pkgsAsAttrs);
|
||||||
pkgExprs = insertTopo "zsh" (builtins.attrNames pkgsAsAttrs);
|
pkgExprs = insertTopo "zsh" (builtins.attrNames pkgsAsAttrs);
|
||||||
in mkShell ({
|
in mkShell ({
|
||||||
# TODO: generate `shellPreamble` here to reduce wrapping
|
|
||||||
inherit pkgsEnv pkgExprs;
|
inherit pkgsEnv pkgExprs;
|
||||||
interpreter = lib.getExe zsh;
|
interpreter = lib.getExe zsh;
|
||||||
|
postConfigure = ''
|
||||||
|
shellPreamble='
|
||||||
|
export PATH=''${PATH:+$PATH:}'"$append_PATH"'
|
||||||
|
export XDG_DATA_DIRS=''${XDG_DATA_DIRS:+$XDG_DATA_DIRS:}'"$append_XDG_DATA_DIRS"'
|
||||||
|
'
|
||||||
|
unset append_PATH
|
||||||
|
unset append_XDG_DATA_DIRS
|
||||||
|
'';
|
||||||
} // (removeAttrs attrs [ "pkgs" "zsh" ])
|
} // (removeAttrs attrs [ "pkgs" "zsh" ])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user