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 {
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.5.4";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romkatv";
|
|
|
|
repo = "gitstatus";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-mVfB3HWjvk4X8bmLEC/U8SKBRytTh/gjjuReqzN5qTk=";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "powerlevel10k";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.17.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romkatv";
|
|
|
|
repo = "powerlevel10k";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-fgrwbWj6CcPoZ6GbCZ47HRUg8ZSJWOsa7aipEqYuE0Q=";
|
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
|
2022-09-09 14:08:57 +00:00
|
|
|
install -D powerlevel9k.zsh-theme --target-directory=$out/share/zsh-powerlevel10k
|
2020-04-24 23:36:52 +00:00
|
|
|
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 = {
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/romkatv/powerlevel10k/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
platforms = lib.platforms.unix;
|
2023-02-02 18:25:31 +00:00
|
|
|
maintainers = with lib.maintainers; [ hexa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|