about summary refs log tree commit diff
path: root/pkgs/tools/graphics/sic-image-cli
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2021-09-20 21:15:29 -0400
committerfigsoda <figsoda@pm.me>2021-09-20 21:15:29 -0400
commite10b10af399b9c4a187b9728f3dafa4ff0a81851 (patch)
tree5a2a238e18b434a5f41a70a44e5bfd349d2c9678 /pkgs/tools/graphics/sic-image-cli
parent3fffe2d33c02284bd6c08bc8738056e3b5f9935a (diff)
sic-image-cli: init at 0.19.0
Diffstat (limited to 'pkgs/tools/graphics/sic-image-cli')
-rw-r--r--pkgs/tools/graphics/sic-image-cli/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/sic-image-cli/default.nix b/pkgs/tools/graphics/sic-image-cli/default.nix
new file mode 100644
index 0000000000000..1c3eb7c18cde7
--- /dev/null
+++ b/pkgs/tools/graphics/sic-image-cli/default.nix
@@ -0,0 +1,35 @@
+{ lib, rustPlatform, fetchFromGitHub, installShellFiles, nasm }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "sic-image-cli";
+  version = "0.19.0";
+
+  src = fetchFromGitHub {
+    owner = "foresterre";
+    repo = "sic";
+    rev = "v${version}";
+    sha256 = "11km8ngndmzp6sxyfnbll80nigi790s353v7j31jvqcgyn9gjdq9";
+  };
+
+  cargoSha256 = "sha256-mHfQ36Xo37VRRq0y0xvUYy0MAlrfnOfMy1t3IZFdrE8=";
+
+  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";
+  };
+}