2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, substituteAll, pkgs }:
|
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 {
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.5.1";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romkatv";
|
|
|
|
repo = "gitstatus";
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "1ffgh5826985phc8amvzl9iydvsnij5brh4gczfh201vfmw9d4hh";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "powerlevel10k";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.15.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romkatv";
|
|
|
|
repo = "powerlevel10k";
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "1b3j2riainx3zz4irww72z0pb8l8ymnh1903zpsy5wmjgb0wkcwq";
|
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
|
|
|
};
|
|
|
|
}
|