aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/desktops/mate/atril/default.nix
blob: 12c89ee1b111ab6b1959000db6296673021f8ac6 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{ stdenv
, fetchurl
, pkgconfig
, gettext
, gtk3
, glib
, libxml2
, libsecret
, poppler
, itstool
, hicolor-icon-theme
, texlive
, mate
, wrapGAppsHook
, enableEpub ? true, webkitgtk
, enableDjvu ? true, djvulibre
, enablePostScript ? true, libspectre
, enableXps ? true, libgxps
, enableImages ? false
}:

with stdenv.lib;

stdenv.mkDerivation rec {
  pname = "atril";
  version = "1.24.0";

  src = fetchurl {
    url = "https://pub.mate-desktop.org/releases/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
    sha256 = "0967gxw7h2qh2kpwl0jgv58hicz6aa92kr12mnykbpikad25s95y";
  };

  nativeBuildInputs = [
    pkgconfig
    gettext
    wrapGAppsHook
  ];

  buildInputs = [
    gtk3
    glib
    itstool
    libsecret
    libxml2
    poppler
    mate.caja
    mate.mate-desktop
    hicolor-icon-theme
    texlive.bin.core  # for synctex, used by the pdf back-end
  ]
  ++ optionals enableDjvu [ djvulibre ]
  ++ optionals enableEpub [ webkitgtk ]
  ++ optionals enablePostScript [ libspectre ]
  ++ optionals enableXps [ libgxps ]
  ;

  configureFlags = [ ]
    ++ optionals (enableDjvu) [ "--enable-djvu" ]
    ++ optionals (enableEpub) [ "--enable-epub" ]
    ++ optionals (enablePostScript) [ "--enable-ps" ]
    ++ optionals (enableXps) [ "--enable-xps" ]
    ++ optionals (enableImages) [ "--enable-pixbuf" ];

  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";

  makeFlags = [ "cajaextensiondir=$$out/lib/caja/extensions-2.0" ];

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    description = "A simple multi-page document viewer for the MATE desktop";
    homepage = "https://mate-desktop.org";
    license = licenses.gpl2;
    platforms = platforms.unix;
    maintainers = [ maintainers.romildo ];
  };
}