depot/third_party/nixpkgs/pkgs/tools/graphics/sic-image-cli/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

35 lines
987 B
Nix

{ lib, rustPlatform, fetchFromGitHub, installShellFiles, nasm }:
rustPlatform.buildRustPackage rec {
pname = "sic-image-cli";
version = "0.20.1";
src = fetchFromGitHub {
owner = "foresterre";
repo = "sic";
rev = "v${version}";
sha256 = "sha256-VSBOmE5xdAS15z/KgQ54KfxM2/plEKtpmjOB+T9kLt4=";
};
cargoSha256 = "sha256-hkK22c7Z/Wj8ebQkjcdK7H6dms6MI9Sm9yrpqfCCxGA=";
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";
};
}