2021-09-22 15:38:15 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, nasm }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "sic-image-cli";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.20.0";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "foresterre";
|
|
|
|
repo = "sic";
|
|
|
|
rev = "v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-KoDX/d457dTHsmz8VTPhfF2MiB5vZzLFKG46/L351SQ=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
cargoSha256 = "sha256-sKEZhJivLbos0KLzPCEnGgTCgbyWSIOvHMhoC1IaJRo=";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
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-image-cli";
|
|
|
|
changelog = "https://github.com/foresterre/sic/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
mainProgram = "sic";
|
|
|
|
};
|
|
|
|
}
|