nixpkgs/pkgs/shells/zsh/zsh-powerlevel10k/default.nix
Martin Weinelt 9ecd40908d
zsh-powerlevel10k: pin gitstatus version
The required gitstatus version compatible with zsh-powerlevel10k has
been pinned, as even though it is written by the same author, gitstatus
has received updates which are not yet compatible with zsh-p10k.

Fixes: #101946
2020-10-28 17:15:42 +01:00

54 lines
1.6 KiB
Nix

{ stdenv, fetchFromGitHub, substituteAll, pkgs }:
# To make use of this derivation, use
# `programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";`
let
# match gitstatus version with given `gitstatus_version`:
# https://github.com/romkatv/powerlevel10k/blob/master/gitstatus/build.info
gitstatus = pkgs.gitAndTools.gitstatus.overrideAttrs (oldAtttrs: rec {
version = "1.2.0";
src = fetchFromGitHub {
owner = "romkatv";
repo = "gitstatus";
rev = "v${version}";
sha256 = "0xi5ab0rsj6xs4vqgn2j5rih1nncghr83yn395mk1is1f4bsmp0s";
};
});
in
stdenv.mkDerivation rec {
pname = "powerlevel10k";
version = "1.13.0";
src = fetchFromGitHub {
owner = "romkatv";
repo = "powerlevel10k";
rev = "v${version}";
sha256 = "0w5rv7z47nys3x113mdddpb2pf1d9pmz9myh4xjzrcy4hp4qv421";
};
patches = [
(substituteAll {
src = ./gitstatusd.patch;
gitstatusdPath = "${gitstatus}/bin/gitstatusd";
})
];
installPhase = ''
install -D powerlevel10k.zsh-theme --target-directory=$out/share/zsh-powerlevel10k
install -D config/* --target-directory=$out/share/zsh-powerlevel10k/config
install -D internal/* --target-directory=$out/share/zsh-powerlevel10k/internal
cp -R gitstatus $out/share/zsh-powerlevel10k/gitstatus
'';
meta = {
description = "A fast reimplementation of Powerlevel9k ZSH theme";
homepage = "https://github.com/romkatv/powerlevel10k";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.hexa ];
};
}