Skip to content

Instantly share code, notes, and snippets.

@infinisil
Last active January 25, 2018 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infinisil/0b3ea2bae7a552f7a707a58946e35179 to your computer and use it in GitHub Desktop.
Save infinisil/0b3ea2bae7a552f7a707a58946e35179 to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
fetchFromGitHub {
owner = "sorin-ionescu";
repo = "prezto";
rev = "54d2a76731041ccefd0f19e17fd87e970081cea7";
sha256 = "0lzdaidpnn7m3drp41f6nqysl451c0ywskfxfyq9xvz8f39936dq";
fetchSubmodules = true;
postFetch = ''
cd $out
for f in $(find modules -type f -name '*.zsh'); do
substituteInPlace $f --replace \
'cache_file="''${0:h}/cache.zsh"' \
"cache_file=\"\$HOME/.cache/prezto/$(basename $(dirname $f)).zsh\""
done
for f in $(find . -type f -name '*.zsh'); do
${zsh}/bin/zsh -c "zcompile $f"
done
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment