From c6cae19d1937c21213bd37127d027365942be850 Mon Sep 17 00:00:00 2001 From: Chuang Zhu Date: Mon, 17 Oct 2022 01:02:27 +0800 Subject: [PATCH] viu: add withSixel option; adopt --- pkgs/tools/graphics/viu/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/graphics/viu/default.nix b/pkgs/tools/graphics/viu/default.nix index 34bec2159095..ade2dd7331bf 100644 --- a/pkgs/tools/graphics/viu/default.nix +++ b/pkgs/tools/graphics/viu/default.nix @@ -1,4 +1,9 @@ -{ lib, rustPlatform, fetchFromGitHub }: +{ lib +, rustPlatform +, fetchFromGitHub +, libsixel +, withSixel ? false +}: rustPlatform.buildRustPackage rec { pname = "viu"; @@ -16,10 +21,13 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-ildtjaYGbrQacJOdGDVwFv+kod+vZHqukWN6ARtJqI4="; + buildFeatures = lib.optional withSixel "sixel"; + buildInputs = lib.optional withSixel libsixel; + 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; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ chuangzhu ]; }; }