nixpkgs/pkgs/shells/liquidprompt/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.4 KiB
Nix
Raw Normal View History

2023-10-24 23:18:17 +00:00
{ lib, stdenv, fetchFromGitHub, gitUpdater }:
2019-08-10 09:59:26 +00:00
stdenv.mkDerivation rec {
pname = "liquidprompt";
version = "2.2.1";
2019-08-10 09:59:26 +00:00
src = fetchFromGitHub {
owner = "liquidprompt";
2019-08-10 09:59:26 +00:00
repo = pname;
rev = "v${version}";
hash = "sha256-ZVzFGe3ItWsN23iyGpxZEN2KtviYKI8x/sDa2MRio/Y=";
2019-08-10 09:59:26 +00:00
};
2022-05-06 18:39:28 +00:00
strictDeps = true;
postPatch = ''
patchShebangs tools/*.sh
'';
2019-08-10 09:59:26 +00:00
installPhase = ''
runHook preInstall
2019-08-10 09:59:26 +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
# 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
2019-08-10 09:59:26 +00:00
'';
2023-10-24 23:18:17 +00:00
passthru.updateScript = gitUpdater { };
meta = with lib; {
2019-08-10 09:59:26 +00:00
description = "Full-featured & carefully designed adaptive prompt for Bash & Zsh";
homepage = "https://github.com/liquidprompt/liquidprompt";
2024-03-19 12:26:06 +00:00
license = licenses.agpl3Plus;
2019-08-10 09:59:26 +00:00
platforms = platforms.all;
maintainers = with maintainers; [ gerschtli ];
};
}