oh-my-zsh: undefine functions that don't work on Nix

Both functions expect oh-my-zsh to be in ~/.oh-my-zsh and try to
modify the directory. This doesn't work, since it is in the
Nix store.
This commit is contained in:
Samuel Gräfenstein 2020-07-11 17:56:57 +02:00
parent a091844715
commit 153367b0ea
No known key found for this signature in database
GPG key ID: EF76A063F15C63C8

View file

@ -35,6 +35,17 @@ stdenv.mkDerivation rec {
-e 's/\# \(DISABLE_AUTO_UPDATE="true"\)/\1/' \
$template
chmod +w oh-my-zsh.sh
# Both functions expect oh-my-zsh to be in ~/.oh-my-zsh and try to
# modify the directory.
cat >> oh-my-zsh.sh <<- EOF
# Undefine functions that don't work on Nix.
unfunction uninstall_oh_my_zsh
unfunction upgrade_oh_my_zsh
EOF
# Look for .zsh_variables, .zsh_aliases, and .zsh_funcs, and source
# them, if found.
cat >> $template <<- EOF