nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 41 lines 968 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 makeWrapper, 6 imagemagick, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "tiv"; 11 version = "1.1.1"; 12 13 src = fetchFromGitHub { 14 owner = "stefanhaustein"; 15 repo = "TerminalImageViewer"; 16 rev = "v${version}"; 17 sha256 = "sha256-mCgybL4af19zqECN1pBV+WnxMq2ZtlK5GDTQO3u9CK0="; 18 }; 19 20 nativeBuildInputs = [ makeWrapper ]; 21 22 buildInputs = [ imagemagick ]; 23 24 makeFlags = [ "prefix=$(out)" ]; 25 26 preConfigure = "cd src/main/cpp"; 27 28 postFixup = '' 29 wrapProgram $out/bin/tiv \ 30 --prefix PATH : ${lib.makeBinPath [ imagemagick ]} 31 ''; 32 33 meta = with lib; { 34 homepage = "https://github.com/stefanhaustein/TerminalImageViewer"; 35 description = "Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode block graphics characters"; 36 mainProgram = "tiv"; 37 license = licenses.asl20; 38 maintainers = with maintainers; [ magnetophon ]; 39 platforms = [ "x86_64-linux" ]; 40 }; 41}