From f34aeeab8cf46b894f2a5c63a13c9b0637a1b6d6 Mon Sep 17 00:00:00 2001 From: Nick Hu Date: Tue, 9 Feb 2021 02:16:04 +0000 Subject: [PATCH] zsh-prezto: make zshrc aware of where zsh-prezto is installed (#112448) Without this, the bundled zshrc runcom is useless as it assumes that zsh-prezto is installed in $ZDOTDIR:-$HOME/.zprezto, so it can't find its entrypoint. Crucially, the home-manager zsh-prezto module uses this runcom so is broken without this also. --- pkgs/shells/zsh/zsh-prezto/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/shells/zsh/zsh-prezto/default.nix b/pkgs/shells/zsh/zsh-prezto/default.nix index 98cbf2c80f0f..d3e2c6534aa2 100644 --- a/pkgs/shells/zsh/zsh-prezto/default.nix +++ b/pkgs/shells/zsh/zsh-prezto/default.nix @@ -12,6 +12,11 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; + postPatch = '' + # make zshrc aware of where zsh-prezto is installed + sed -i -e "s|\''${ZDOTDIR:\-\$HOME}/.zprezto/|$out/share/zsh-prezto/|g" runcoms/zshrc + ''; + installPhase = '' mkdir -p $out/share/zsh-prezto cp -R ./ $out/share/zsh-prezto