zsh-prezto: install to right place

This commit is contained in:
Monson Shao 2021-01-30 02:25:03 +08:00
parent 27c60f4959
commit d5b4c4fdac
No known key found for this signature in database
GPG key ID: 163271C707982C65

View file

@ -12,26 +12,20 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
buildPhase = ''
sed -i '/\''${ZDOTDIR:\-\$HOME}\/.zpreztorc" ]]/i\
if [[ -s "/etc/zpreztorc" ]]; then\
source "/etc/zpreztorc"\
fi' init.zsh
sed -i -e "s|\''${ZDOTDIR:\-\$HOME}/.zprezto/|$out/|g" init.zsh
for i in runcoms/*; do
sed -i -e "s|\''${ZDOTDIR:\-\$HOME}/.zprezto/|$out/|g" $i
done
'';
installPhase = ''
mkdir -p $out
cp ./* $out/ -R
mkdir -p $out/share/zsh-prezto
cp -R ./ $out/share/zsh-prezto
'';
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "Prezto is the configuration framework for Zsh; it enriches the command line interface environment with sane defaults, aliases, functions, auto completion, and prompt themes";
description = "The configuration framework for Zsh";
longDescription = ''
Prezto is the configuration framework for Zsh; it enriches
the command line interface environment with sane defaults,
aliases, functions, auto completion, and prompt themes.
'';
homepage = "https://github.com/sorin-ionescu/prezto";
license = licenses.mit;
maintainers = with maintainers; [ holymonson ];