zsh-prezto: make zshrc aware of where zsh-prezto is installed (#112448)

Without this, the bundled zshrc runcom is useless as it assumes that
zsh-prezto is installed in $ZDOTDIR:-$HOME/.zprezto, so it can't find
its entrypoint. Crucially, the home-manager zsh-prezto module uses this
runcom so is broken without this also.
This commit is contained in:
Nick Hu 2021-02-09 02:16:04 +00:00 committed by GitHub
parent 1f54e3bc12
commit f34aeeab8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
postPatch = ''
# make zshrc aware of where zsh-prezto is installed
sed -i -e "s|\''${ZDOTDIR:\-\$HOME}/.zprezto/|$out/share/zsh-prezto/|g" runcoms/zshrc
'';
installPhase = ''
mkdir -p $out/share/zsh-prezto
cp -R ./ $out/share/zsh-prezto