summary refs log tree commit diff
path: root/pkgs/shells/zsh/oh-my-zsh/default.nix
diff options
context:
space:
mode:
authorSamuel Gräfenstein <git@samuelgrf.com>2020-07-11 17:56:57 +0200
committerSamuel Gräfenstein <git@samuelgrf.com>2020-07-13 09:38:18 +0200
commit153367b0ea6fce05022661d8aca15459234e572d (patch)
tree8ea041edb94f9c177344af2839c156d93de6ec45 /pkgs/shells/zsh/oh-my-zsh/default.nix
parenta091844715e88ffcf7ec222d4ef315b03ec0ef79 (diff)
downloadnixpkgs-153367b0ea6fce05022661d8aca15459234e572d.tar
nixpkgs-153367b0ea6fce05022661d8aca15459234e572d.tar.gz
nixpkgs-153367b0ea6fce05022661d8aca15459234e572d.tar.bz2
nixpkgs-153367b0ea6fce05022661d8aca15459234e572d.tar.lz
nixpkgs-153367b0ea6fce05022661d8aca15459234e572d.tar.xz
nixpkgs-153367b0ea6fce05022661d8aca15459234e572d.tar.zst
nixpkgs-153367b0ea6fce05022661d8aca15459234e572d.zip
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.
Diffstat (limited to 'pkgs/shells/zsh/oh-my-zsh/default.nix')
-rw-r--r--pkgs/shells/zsh/oh-my-zsh/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/shells/zsh/oh-my-zsh/default.nix b/pkgs/shells/zsh/oh-my-zsh/default.nix
index 3539021ae3d..c979fd7ecca 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