nixpkgs/pkgs/applications/graphics/imgp/default.nix

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

41 lines
1.0 KiB
Nix
Raw Normal View History

2023-12-28 21:07:53 +00:00
{ lib, fetchFromGitHub, buildPythonApplication, pythonOlder, pillow }:
2019-12-28 16:26:51 +00:00
buildPythonApplication rec {
pname = "imgp";
2023-12-28 21:07:53 +00:00
version = "2.9";
disabled = pythonOlder "3.8";
2019-12-28 16:26:51 +00:00
src = fetchFromGitHub {
owner = "jarun";
2023-12-28 21:07:53 +00:00
repo = "imgp";
2019-12-28 16:26:51 +00:00
rev = "v${version}";
2023-12-28 21:07:53 +00:00
hash = "sha256-yQ2BzOBn6Bl9ieZkREKsj1zLnoPcf0hZhZ90Za5kiKA=";
2019-12-28 16:26:51 +00:00
};
propagatedBuildInputs = [ pillow ];
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
'';
meta = with lib; {
description = "High-performance CLI batch image resizer & rotator";
mainProgram = "imgp";
2019-12-28 16:26:51 +00:00
homepage = "https://github.com/jarun/imgp";
2023-12-28 21:07:53 +00:00
license = licenses.gpl3Plus;
2019-12-28 16:26:51 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ sikmir ];
};
}