1{ lib, stdenv, fetchurl, meson, ninja, pkg-config, glib, gobject-introspection, cairo
2, libarchive, freetype, libjpeg, libtiff, gnome, lcms2
3}:
4
5stdenv.mkDerivation rec {
6 pname = "libgxps";
7 version = "0.3.2";
8
9 outputs = [ "out" "dev" ];
10
11 src = fetchurl {
12 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
13 sha256 = "bSeGclajXM+baSU+sqiKMrrKO5fV9O9/guNmf6Q1JRw=";
14 };
15
16 nativeBuildInputs = [ meson ninja pkg-config gobject-introspection ];
17 buildInputs = [ glib cairo freetype libjpeg libtiff lcms2 ];
18 propagatedBuildInputs = [ libarchive ];
19
20 mesonFlags = [
21 "-Denable-test=false"
22 ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
23 "-Ddisable-introspection=true"
24 ];
25
26 passthru = {
27 updateScript = gnome.updateScript {
28 packageName = pname;
29 versionPolicy = "none";
30 };
31 };
32
33 meta = with lib; {
34 description = "A GObject based library for handling and rendering XPS documents";
35 homepage = "https://wiki.gnome.org/Projects/libgxps";
36 license = licenses.lgpl21Plus;
37 maintainers = teams.gnome.members;
38 platforms = platforms.unix;
39 };
40}