about summary refs log tree commit diff
path: root/pkgs/applications/misc/jp2a/default.nix
blob: 7702468768167c1034b6dc6e2573378b270e4af3 (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
35
36
37
38
39
40
41
42
43
44
45
{ lib
, stdenv
, fetchFromGitHub
, libjpeg
, libpng
, ncurses
, autoreconfHook
, autoconf-archive
, pkg-config
, bash-completion
}:

stdenv.mkDerivation rec {
  version = "1.2.0";
  pname = "jp2a";

  src = fetchFromGitHub {
    owner = "Talinx";
    repo = "jp2a";
    rev = "v${version}";
    sha256 = "sha256-TyXEaHemKfCMyGwK6P2vVL9gPWRLbkaNP0g+/UYGSVc=";
  };

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

  nativeBuildInputs = [
    autoreconfHook
    autoconf-archive
    pkg-config
    bash-completion
  ];
  buildInputs = [ libjpeg libpng ncurses ];

  installFlags = [ "bashcompdir=\${out}/share/bash-completion/completions" ];

  meta = with lib; {
    broken = stdenv.isDarwin;
    homepage = "https://csl.name/jp2a/";
    description = "Small utility that converts JPG images to ASCII";
    license = licenses.gpl2Only;
    maintainers = [ maintainers.FlorianFranzen ];
    platforms = platforms.unix;
    mainProgram = "jp2a";
  };
}