2024-06-05 15:53:02 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, gitUpdater }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "liquidprompt";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-06-05 15:53:02 +00:00
|
|
|
owner = "liquidprompt";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = pname;
|
2020-08-20 17:08:02 +00:00
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-ra+uJg9E2Cr1k0Ni1+xG9yKFF9iMInJFB5oAFnc52lc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
strictDeps = true;
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tools/*.sh
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2024-06-05 15:53:02 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
install -D -m 0444 liquidprompt $out/bin/liquidprompt
|
|
|
|
|
|
|
|
install -D -m 0444 liquidprompt.plugin.zsh \
|
|
|
|
$out/share/zsh/plugins/liquidprompt/liquidprompt.plugin.zsh
|
|
|
|
install -D -m 0444 liquidprompt \
|
|
|
|
$out/share/zsh/plugins/liquidprompt/liquidprompt
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
# generate default config file
|
|
|
|
mkdir -p $out/share/doc/liquidprompt
|
|
|
|
tools/config-from-doc.sh --verbose > $out/share/doc/liquidprompt/liquidpromptrc-dist
|
|
|
|
|
|
|
|
mkdir -p $out/share/liquidprompt
|
|
|
|
cp -a themes $out/share/liquidprompt/
|
|
|
|
|
|
|
|
mkdir -p $out/share/liquidprompt/contrib
|
|
|
|
cp -a contrib/presets $out/share/liquidprompt/contrib/
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A full-featured & carefully designed adaptive prompt for Bash & Zsh";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://github.com/liquidprompt/liquidprompt";
|
2024-04-21 15:54:59 +00:00
|
|
|
license = licenses.agpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ gerschtli ];
|
|
|
|
};
|
|
|
|
}
|