imgp: 2.9 -> 3.0 (#553732)

This commit is contained in:
Nikolay Korotkiy
2026-08-17 23:00:08 +00:00
committed by GitHub

View File

@@ -2,37 +2,41 @@
lib,
fetchFromGitHub,
python3Packages,
installShellFiles,
versionCheckHook,
}:
python3Packages.buildPythonApplication (finalAttrs: {
pname = "imgp";
version = "2.9";
version = "3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jarun";
repo = "imgp";
rev = "v${finalAttrs.version}";
hash = "sha256-yQ2BzOBn6Bl9ieZkREKsj1zLnoPcf0hZhZ90Za5kiKA=";
tag = "v${finalAttrs.version}";
hash = "sha256-CmpF4vIu7tXSnMTl/cBq/L4SHinT/ytO2OUjdjrFQRU=";
};
build-system = [ python3Packages.setuptools ];
dependencies = [ python3Packages.pillow ];
nativeBuildInputs = [ installShellFiles ];
nativeInstallCheckInputs = [ versionCheckHook ];
installFlags = [
"DESTDIR=$(out)"
"PREFIX="
];
postInstall = ''
install -Dm555 auto-completion/bash/imgp-completion.bash $out/share/bash-completion/completions/imgp.bash
install -Dm555 auto-completion/fish/imgp.fish -t $out/share/fish/vendor_completions.d
install -Dm555 auto-completion/zsh/_imgp -t $out/share/zsh/site-functions
'';
checkPhase = ''
$out/bin/imgp --help
installManPage imgp.1
installShellCompletion --cmd imgp \
--bash auto-completion/bash/imgp-completion.bash \
--fish auto-completion/fish/imgp.fish \
--zsh auto-completion/zsh/_imgp
'';
meta = {