From 153367b0ea6fce05022661d8aca15459234e572d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Gr=C3=A4fenstein?= Date: Sat, 11 Jul 2020 17:56:57 +0200 Subject: [PATCH] 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. --- pkgs/shells/zsh/oh-my-zsh/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/shells/zsh/oh-my-zsh/default.nix b/pkgs/shells/zsh/oh-my-zsh/default.nix index 3539021ae3d1..c979fd7ecca2 100644 --- a/pkgs/shells/zsh/oh-my-zsh/default.nix +++ b/pkgs/shells/zsh/oh-my-zsh/default.nix @@ -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