depot/third_party/nixpkgs/pkgs/tools/graphics/sic-image-cli/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

35 lines
987 B
Nix

{ lib, rustPlatform, fetchFromGitHub, installShellFiles, nasm }:
rustPlatform.buildRustPackage rec {
pname = "sic-image-cli";
version = "0.22.3";
src = fetchFromGitHub {
owner = "foresterre";
repo = "sic";
rev = "v${version}";
sha256 = "sha256-gTKStoQakquJqBv4OLWC4/1FtV+Cvw0nN+dY6AH8TNw=";
};
cargoSha256 = "sha256-xYPSI0/I67vmMPRmJOlbDJ9gTdhViQmeo3XWGhWR91Y=";
nativeBuildInputs = [ installShellFiles nasm ];
postBuild = ''
cargo run --example gen_completions
'';
postInstall = ''
installShellCompletion sic.{bash,fish}
installShellCompletion --zsh _sic
'';
meta = with lib; {
description = "Accessible image processing and conversion from the terminal";
homepage = "https://github.com/foresterre/sic";
changelog = "https://github.com/foresterre/sic/blob/v${version}/CHANGELOG.md";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ figsoda ];
mainProgram = "sic";
};
}