nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 rustPlatform,
5 fetchFromGitHub,
6 installShellFiles,
7 nasm,
8}:
9
10rustPlatform.buildRustPackage rec {
11 pname = "sic-image-cli";
12 version = "0.22.4";
13
14 src = fetchFromGitHub {
15 owner = "foresterre";
16 repo = "sic";
17 rev = "v${version}";
18 hash = "sha256-PFbHHO3m4mnV5s8DVev/iao9sC3FYht0whTHYzO25Yo=";
19 };
20
21 cargoHash = "sha256-HL/KCC8Y42OFL1LXoewmH1Bxp6FICuDjkTnK5DE94Ms=";
22
23 nativeBuildInputs = [
24 installShellFiles
25 nasm
26 ];
27
28 postBuild = ''
29 cargo run --example gen_completions
30 '';
31
32 postInstall = ''
33 installShellCompletion sic.{bash,fish}
34 installShellCompletion --zsh _sic
35 '';
36
37 meta = {
38 description = "Accessible image processing and conversion from the terminal";
39 homepage = "https://github.com/foresterre/sic";
40 changelog = "https://github.com/foresterre/sic/blob/v${version}/CHANGELOG.md";
41 license = with lib.licenses; [
42 asl20 # or
43 mit
44 ];
45 maintainers = [ ];
46 mainProgram = "sic";
47 # The last successful Darwin Hydra build was in 2024
48 broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
49 };
50}