@@ -14,27 +14,31 @@
1414, glib
1515, xapian
1616, libxml2
17+, libxmlb
1718, libyaml
1819, gobject-introspection
1920, pcre
2021, itstool
2122, gperf
2223, vala
23−, lmdb
2424, curl
25+, nixosTests
2526}:
2627
2728stdenv.mkDerivation rec {
2829 pname = "appstream";
29− version = "0.14.4";
30+ version = "0.15.2";
31+ # When bumping this package, please also check whether
32+ # fix-build-for-qt-olderthan-514.patch still applies by
33+ # building libsForQt512.appstream-qt.
3034
31− outputs = [ "out" "dev" ];
35+ outputs = [ "out" "dev" "installedTests" ];
3236
3337 src = fetchFromGitHub {
3438 owner = "ximion";
3539 repo = "appstream";
3640 rev = "v${version}";
37− sha256 = "sha256-DJXCw50f+8c58bJw6xx0ECfkc9/KcWaeA+ne2zmTyhg=";
41+ sha256 = "sha256-/JZ49wjtcInbGUOVVjevVSrLCHcA60FMT165rhfb78Q=";
3842 };
3943
4044 patches = [
@@ -43,6 +47,9 @@ stdenv.mkDerivation rec {
4347 src = ./fix-paths.patch;
4448 libstemmer_includedir = "${lib.getDev libstemmer}/include";
4549 })
50+
51+ # Allow installing installed tests to a separate output.
52+ ./installed-tests-path.patch
4653 ];
4754
4855 nativeBuildInputs = [
@@ -65,9 +72,9 @@ stdenv.mkDerivation rec {
6572 glib
6673 xapian
6774 libxml2
75+ libxmlb
6876 libyaml
6977 gperf
70− lmdb
7178 curl
7279 ];
7380
@@ -75,8 +82,15 @@ stdenv.mkDerivation rec {
7582 "-Dapidocs=false"
7683 "-Ddocs=false"
7784 "-Dvapi=true"
85+ "-Dinstalled_test_prefix=${placeholder "installedTests"}"
7886 ];
7987
88+ passthru = {
89+ tests = {
90+ installed-tests = nixosTests.installed-tests.appstream;
91+ };
92+ };
93+
8094 meta = with lib; {
8195 description = "Software metadata handling library";
8296 homepage = "https://www.freedesktop.org/wiki/Distributions/AppStream/";
@@ -88,5 +102,5 @@ stdenv.mkDerivation rec {
88102 '';
89103 license = licenses.lgpl21Plus;
90104 platforms = platforms.unix;
91− };
105+ };
92106}