about summary refs log tree commit diff
path: root/pkgs/tools/graphics/viu/default.nix
blob: 20267511fd1314651247c86d51d7c2a891d07306 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib
, rustPlatform
, fetchFromGitHub
, libsixel
, withSixel ? false
}:

rustPlatform.buildRustPackage rec {
  pname = "viu";
  version = "1.4.0";

  src = fetchFromGitHub {
    owner = "atanunq";
    repo = "viu";
    rev = "v${version}";
    sha256 = "sha256-lAuIl25368Gv717a8p2So1o1VMDJJAOlDdqfItYizo4=";
  };

  # tests need an interactive terminal
  doCheck = false;

  cargoSha256 = "sha256-ildtjaYGbrQacJOdGDVwFv+kod+vZHqukWN6ARtJqI4=";

  buildFeatures = lib.optional withSixel "sixel";
  buildInputs = lib.optional withSixel libsixel;

  meta = with lib; {
    description = "Command-line application to view images from the terminal written in Rust";
    homepage = "https://github.com/atanunq/viu";
    license = licenses.mit;
    maintainers = with maintainers; [ chuangzhu ];
    mainProgram = "viu";
  };
}