summary refs log tree commit diff
path: root/pkgs/applications/graphics/imgcat/default.nix
blob: 5943632930c578a7f90f7ca257ed4a6e1c8e202e (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
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, ncurses }:

stdenv.mkDerivation rec {
  pname = "imgcat";
  version = "2.3.1";

  nativeBuildInputs = [ autoconf automake libtool ];
  buildInputs = [ ncurses ];

  preConfigure = ''
    ${autoconf}/bin/autoconf
    sed -i -e "s|-ltermcap|-L ${ncurses}/lib -lncurses|" Makefile
  '';

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

  src = fetchFromGitHub {
    owner = "eddieantonio";
    repo = pname;
    rev = "v${version}";
    sha256 = "0frz40rjwi73nx2dlqvmnn56zwr29bmnngfb11hhwr7v58yfajdi";
  };

  NIX_CFLAGS_COMPILE = "-Wno-error";

  meta = with stdenv.lib; {
    description = "It's like cat, but for images";
    homepage = "https://github.com/eddieantonio/imgcat";
    license = licenses.isc;
    maintainers = with maintainers; [ jwiegley ];
    platforms = platforms.unix;
  };
}