about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libgxps/default.nix
blob: 041431651c3e29d55ee68e0cbdf2bd23260a065e (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
{ lib, stdenv, fetchurl, meson, ninja, pkg-config, glib, gobject-introspection, cairo
, libarchive, freetype, libjpeg, libtiff, gnome, lcms2
}:

stdenv.mkDerivation rec {
  pname = "libgxps";
  version = "0.3.2";

  outputs = [ "out" "dev" ];

  src = fetchurl {
    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
    sha256 = "bSeGclajXM+baSU+sqiKMrrKO5fV9O9/guNmf6Q1JRw=";
  };

  nativeBuildInputs = [ meson ninja pkg-config gobject-introspection ];
  buildInputs = [ glib cairo freetype libjpeg libtiff lcms2 ];
  propagatedBuildInputs = [ libarchive ];

  mesonFlags = [
    "-Denable-test=false"
  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
    "-Ddisable-introspection=true"
  ];

  passthru = {
    updateScript = gnome.updateScript {
      packageName = pname;
      versionPolicy = "none";
    };
  };

  meta = with lib; {
    description = "A GObject based library for handling and rendering XPS documents";
    homepage = "https://gitlab.gnome.org/GNOME/libgxps";
    license = licenses.lgpl21Plus;
    maintainers = teams.gnome.members;
    platforms = platforms.unix;
  };
}