depot/third_party/nixpkgs/pkgs/shells/zsh/zsh-powerlevel10k/default.nix
Default email a4fd2de975 Project import generated by Copybara.
GitOrigin-RevId: 34ad166a830d3ac1541dcce571c52231f2f0865a
2020-11-02 21:18:15 -05:00

53 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 ];
};
}