Skip to content

Commit 153367b

Browse files
committed
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.
1 parent a091844 commit 153367b

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

pkgs/shells/zsh/oh-my-zsh/default.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ stdenv.mkDerivation rec {
3535
-e 's/\# \(DISABLE_AUTO_UPDATE="true"\)/\1/' \
3636
$template
3737
38+
chmod +w oh-my-zsh.sh
39+
40+
# Both functions expect oh-my-zsh to be in ~/.oh-my-zsh and try to
41+
# modify the directory.
42+
cat >> oh-my-zsh.sh <<- EOF
43+
44+
# Undefine functions that don't work on Nix.
45+
unfunction uninstall_oh_my_zsh
46+
unfunction upgrade_oh_my_zsh
47+
EOF
48+
3849
# Look for .zsh_variables, .zsh_aliases, and .zsh_funcs, and source
3950
# them, if found.
4051
cat >> $template <<- EOF

0 commit comments

Comments
 (0)