1{ stdenv, fetchpatch, fetchFromGitHub, meson, ninja, pkgconfig, gettext
2, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt
3, libstemmer, glib, xapian, libxml2, libyaml, gobject-introspection
4, pcre, itstool, gperf, vala
5}:
6
7stdenv.mkDerivation rec {
8 name = "appstream-${version}";
9 version = "0.12.6";
10
11 src = fetchFromGitHub {
12 owner = "ximion";
13 repo = "appstream";
14 rev = "APPSTREAM_${stdenv.lib.replaceStrings ["."] ["_"] version}";
15 sha256 = "0hbl26aw3g2hag7z4di9z59qz057qcywrxpnnmp86z7rngvjbqpx";
16 };
17
18 nativeBuildInputs = [
19 meson ninja pkgconfig gettext
20 libxslt xmlto docbook_xsl docbook_xml_dtd_45
21 gobject-introspection itstool vala
22 ];
23
24 buildInputs = [ libstemmer pcre glib xapian libxml2 libyaml gperf ];
25
26 prePatch = ''
27 substituteInPlace meson.build \
28 --replace /usr/include ${libstemmer}/include
29
30 substituteInPlace data/meson.build \
31 --replace /etc $out/etc
32 '';
33
34 mesonFlags = [
35 "-Dapidocs=false"
36 "-Ddocs=false"
37 "-Dvapi=true"
38 ];
39
40 meta = with stdenv.lib; {
41 description = "Software metadata handling library";
42 homepage = https://www.freedesktop.org/wiki/Distributions/AppStream/;
43 longDescription = ''
44 AppStream is a cross-distro effort for building Software-Center applications
45 and enhancing metadata provided by software components. It provides
46 specifications for meta-information which is shipped by upstream projects and
47 can be consumed by other software.
48 '';
49 license = licenses.lgpl21Plus;
50 platforms = platforms.linux;
51 };
52}