Skip to content

Commit

Permalink
tiv: add imagemagick to path
Browse files Browse the repository at this point in the history
Required for e.g. jpg and png support, c.f. stefanhaustein/TerminalImageViewer#56
  • Loading branch information
SFrijters committed Mar 21, 2023
1 parent 32aa2ed commit fbda432
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pkgs/applications/misc/tiv/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ lib, stdenv, fetchFromGitHub, imagemagick }:
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, imagemagick
}:

stdenv.mkDerivation rec {
pname = "tiv";
Expand All @@ -11,12 +16,19 @@ stdenv.mkDerivation rec {
sha256 = "sha256-mCgybL4af19zqECN1pBV+WnxMq2ZtlK5GDTQO3u9CK0=";
};

nativeBuildInputs = [ makeWrapper ];

buildInputs = [ imagemagick ];

makeFlags = [ "prefix=$(out)" ];

preConfigure = "cd src/main/cpp";

postFixup = ''
wrapProgram $out/bin/tiv \
--prefix PATH : ${lib.makeBinPath [ imagemagick ]}
'';

meta = with lib; {
homepage = "https://github.com/stefanhaustein/TerminalImageViewer";
description = "Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode block graphics characters";
Expand Down

0 comments on commit fbda432

Please sign in to comment.