From efc9511c1645b77227a9df140c9861c6e6b4faaf Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 10 Jul 2018 15:28:47 +0200 Subject: [PATCH] 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. --- pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix b/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix index 6dea51a487e9..c4d63bd27710 100644 --- a/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix +++ b/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix @@ -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; {