2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, substituteAll, pkgs, bash }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# To make use of this derivation, use
|
|
|
|
# `programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";`
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
let
|
|
|
|
# match gitstatus version with given `gitstatus_version`:
|
|
|
|
# https://github.com/romkatv/powerlevel10k/blob/master/gitstatus/build.info
|
2021-01-15 22:18:51 +00:00
|
|
|
gitstatus = pkgs.gitstatus.overrideAttrs (oldAtttrs: rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.5.3";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romkatv";
|
|
|
|
repo = "gitstatus";
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "17giwdjrsmr71xskxxf506n8kaab8zx77fv267fx37ifi57nffk5";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "powerlevel10k";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.16.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romkatv";
|
|
|
|
repo = "powerlevel10k";
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "0fkfh8j7rd8mkpgz6nsx4v7665d375266shl1aasdad8blgqmf0c";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
strictDeps = true;
|
|
|
|
buildInputs = [ bash ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./gitstatusd.patch;
|
2020-11-03 02:18:15 +00:00
|
|
|
gitstatusdPath = "${gitstatus}/bin/gitstatusd";
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
2020-06-02 18:00:15 +00:00
|
|
|
cp -R gitstatus $out/share/zsh-powerlevel10k/gitstatus
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A fast reimplementation of Powerlevel9k ZSH theme";
|
|
|
|
homepage = "https://github.com/romkatv/powerlevel10k";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = [ lib.maintainers.hexa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|