2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libsixel
|
|
|
|
, withSixel ? false
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "viu";
|
2022-01-03 16:56:52 +00:00
|
|
|
version = "1.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "atanunq";
|
|
|
|
repo = "viu";
|
|
|
|
rev = "v${version}";
|
2022-01-03 16:56:52 +00:00
|
|
|
sha256 = "sha256-lAuIl25368Gv717a8p2So1o1VMDJJAOlDdqfItYizo4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
# tests need an interactive terminal
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
cargoSha256 = "sha256-ildtjaYGbrQacJOdGDVwFv+kod+vZHqukWN6ARtJqI4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildFeatures = lib.optional withSixel "sixel";
|
|
|
|
buildInputs = lib.optional withSixel libsixel;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A command-line application to view images from the terminal written in Rust";
|
|
|
|
homepage = "https://github.com/atanunq/viu";
|
|
|
|
license = licenses.mit;
|
2022-10-21 18:38:19 +00:00
|
|
|
maintainers = with maintainers; [ chuangzhu ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|