mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
cf9289c0d2
zsh-powerlevel10k: update gitstatus version
54 lines
1.6 KiB
Nix
54 lines
1.6 KiB
Nix
{ lib, 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.gitstatus.overrideAttrs (oldAtttrs: rec {
|
|
version = "1.5.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "romkatv";
|
|
repo = "gitstatus";
|
|
rev = "v${version}";
|
|
sha256 = "1ffgh5826985phc8amvzl9iydvsnij5brh4gczfh201vfmw9d4hh";
|
|
};
|
|
});
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "powerlevel10k";
|
|
version = "1.15.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "romkatv";
|
|
repo = "powerlevel10k";
|
|
rev = "v${version}";
|
|
sha256 = "1b3j2riainx3zz4irww72z0pb8l8ymnh1903zpsy5wmjgb0wkcwq";
|
|
};
|
|
|
|
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 = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.unix;
|
|
maintainers = [ lib.maintainers.hexa ];
|
|
};
|
|
}
|