lambda-mod-zsh-theme: add hooks and patch shebangs

This ensures that no impurity exists due to implicitly depending
on`/usr/bin/env`.

It stores the theme into `$out/share/zsh/themes` to make it possible to
find theme using `buildEnv` and remain consistent with other ZSH
extensions.
This commit is contained in:
Maximilian Bosch 2018-07-10 15:28:47 +02:00
parent 1922b43b7e
commit efc9511c16
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ stdenv, fetchFromGitHub, zsh }:
stdenv.mkDerivation {
name = "lambda-mod-zsh-theme-unstable-2017-10-08";
@ -10,9 +10,13 @@ stdenv.mkDerivation {
rev = "61c373c8aa5556d51522290b82ad44e7166bced1";
};
buildInputs = [ zsh ];
installPhase = ''
mkdir -p $out/share/themes
cp lambda-mod.zsh-theme $out/share/themes
chmod +x lambda-mod.zsh-theme # only executable scripts are found by `patchShebangs`
patchShebangs .
install -Dm0644 lambda-mod.zsh-theme $out/share/zsh/themes/lambda-mod.zsh-theme
'';
meta = with stdenv.lib; {