nixpkgs/pkgs/by-name/li/liquidprompt/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

53 lines
1.4 KiB
Nix

{ lib, stdenv, fetchFromGitHub, gitUpdater }:
stdenv.mkDerivation rec {
pname = "liquidprompt";
version = "2.2.1";
src = fetchFromGitHub {
owner = "liquidprompt";
repo = pname;
rev = "v${version}";
hash = "sha256-ZVzFGe3ItWsN23iyGpxZEN2KtviYKI8x/sDa2MRio/Y=";
};
strictDeps = true;
postPatch = ''
patchShebangs tools/*.sh
'';
installPhase = ''
runHook preInstall
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
'';
passthru.updateScript = gitUpdater { };
meta = with lib; {
description = "Full-featured & carefully designed adaptive prompt for Bash & Zsh";
homepage = "https://github.com/liquidprompt/liquidprompt";
license = licenses.agpl3Plus;
platforms = platforms.all;
maintainers = with maintainers; [ gerschtli ];
};
}