about summary refs log tree commit diff
path: root/pkgs/applications/graphics/qiv/default.nix
blob: 2758148dc1ae3abbb69fdd8cce0f07b4f25a75c9 (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
{ lib, stdenv, fetchurl, pkg-config, gtk2, imlib2, file, lcms2, libexif } :

stdenv.mkDerivation (rec {
  version = "2.3.3";
  pname = "qiv";

  src = fetchurl {
    url = "https://spiegl.de/qiv/download/${pname}-${version}.tgz";
    sha256 = "sha256-7whf/eLUiwWzZlk55a4eNZ06OBAI+4J2hPfW/UxTNwQ=";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ gtk2 imlib2 file lcms2 libexif ];

  preBuild=''
    substituteInPlace Makefile --replace /usr/local "$out"
    substituteInPlace Makefile --replace /man/ /share/man/
    substituteInPlace Makefile --replace /share/share/ /share/
  '';

  meta = with lib; {
    description = "Quick image viewer";
    homepage = "http://spiegl.de/qiv/";
    license = licenses.gpl2;
    platforms = platforms.linux;
    mainProgram = "qiv";
  };
})