git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #35308 from peterhoeg/u/as

appstream: 0.10.6 -> 0.11.8 (and add appstream-qt)

commitcdaedbffd8334b2aad359408ef2fc6715eb12a2d authorPeter Hoeg <peter@hoeg.com> dateThu 22 Feb 2018, 16:03 (9 years ago) parent4f098b0fbde9ea
3 files changed+61−16
pkgs/development/libraries/appstream/default.nix+34−16 pkgs/development/libraries/appstream/qt.nix+25 pkgs/top-level/all-packages.nix+2
pkgs/development/libraries/appstream/default.nix+34−16
@@ -1,37 +1,55 @@
1−{ stdenv, fetchFromGitHub, cmake, pkgconfig, gettext, intltool
2−, xmlto, docbook_xsl, docbook_xml_dtd_45
3−, glib, xapian, libxml2, libyaml, gobjectIntrospection
1+{ stdenv, fetchpatch, fetchFromGitHub, meson, ninja, pkgconfig, gettext
2+, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt
3+, libstemmer, glib, xapian, libxml2, libyaml, gobjectIntrospection
44, pcre, itstool
55}:
66
77stdenv.mkDerivation rec {
88 name = "appstream-${version}";
9− version = "0.10.6";
9+ version = "0.11.8";
1010
1111 src = fetchFromGitHub {
12− owner = "ximion";
13− repo = "appstream";
14− rev = "APPSTREAM_0_10_6";
15− sha256 = "1fg7zxx2qhkyj7fmcpwbf80b72d16kyi8dadi111kf00sgzfbiyy";
12+ owner = "ximion";
13+ repo = "appstream";
14+ rev = "APPSTREAM_${stdenv.lib.replaceStrings ["."] ["_"] version}";
15+ sha256 = "07vzz57g1p5byj2jfg17y5n3il0g07d9wkiynzwra71mcxar1p08";
1616 };
1717
18+ patches = [
19+ # drop this in version 0.11.9 and above
20+ (fetchpatch {
21+ name = "define-location-and-soname.patch";
22+ url = "https://github.com/ximion/appstream/commit/3e58f9c9.patch";
23+ sha256 = "1ffgbdfg80yq5vahjrvdd4f8xsp32ksm9vyasfmc7hzhx294s78w";
24+ })
25+ ];
26+
1827 nativeBuildInputs = [
19− cmake pkgconfig gettext intltool
20− xmlto docbook_xsl docbook_xml_dtd_45
28+ meson ninja pkgconfig gettext
29+ libxslt xmlto docbook_xsl docbook_xml_dtd_45
2130 gobjectIntrospection itstool
2231 ];
2332
24− buildInputs = [ pcre glib xapian libxml2 libyaml ];
33+ buildInputs = [ libstemmer pcre glib xapian libxml2 libyaml ];
2534
26− cmakeFlags = ''
27− -DSTEMMING=off
28− '';
35+ prePatch = ''
36+ substituteInPlace meson.build \
37+ --replace /usr/include ${libstemmer}/include
38+
39+ substituteInPlace data/meson.build \
40+ --replace /etc $out/etc
41+ '';
42+
43+ mesonFlags = [
44+ "-Dapidocs=false"
45+ "-Ddocs=false"
46+ "-Dgir=false"
47+ ];
2948
3049 meta = with stdenv.lib; {
3150 description = "Software metadata handling library";
3251 homepage = https://www.freedesktop.org/wiki/Distributions/AppStream/;
33− longDescription =
34− ''
52+ longDescription = ''
3553 AppStream is a cross-distro effort for building Software-Center applications
3654 and enhancing metadata provided by software components. It provides
3755 specifications for meta-information which is shipped by upstream projects and
pkgs/development/libraries/appstream/qt.nixnew file+25
@@ -0,0 +1,25 @@
1+{ stdenv, appstream, qtbase, qttools }:
2+
3+stdenv.mkDerivation rec {
4+ name = "appstream-qt-${version}";
5+ inherit (appstream) version src patches prePatch;
6+
7+ buildInputs = appstream.buildInputs ++ [ appstream qtbase ];
8+
9+ nativeBuildInputs = appstream.nativeBuildInputs ++ [ qttools ];
10+
11+ mesonFlags = appstream.mesonFlags ++ [ "-Dqt=true" ];
12+
13+ postInstall = ''
14+ rm -rf $out/{bin,etc,include/appstream,lib/pkgconfig,lib/libappstream.so*,share}
15+ '';
16+
17+ preFixup = ''
18+ patchelf --add-needed ${appstream}/lib/libappstream.so.4 \
19+ $out/lib/libAppStreamQt.so
20+ '';
21+
22+ meta = appstream.meta // {
23+ description = "Software metadata handling library - Qt";
24+ };
25+}
pkgs/top-level/all-packages.nix+2
@@ -8242,6 +8242,8 @@ with pkgs;
82428242
82438243 appstream-glib = callPackage ../development/libraries/appstream-glib { };
82448244
8245+ appstream-qt = libsForQt5.callPackage ../development/libraries/appstream/qt.nix { };
8246+
82458247 apr = callPackage ../development/libraries/apr { };
82468248
82478249 aprutil = callPackage ../development/libraries/apr-util {