nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv
2, fetchFromGitHub
3, substituteAll
4, docbook_xml_dtd_42
5, docbook_xsl
6, fontconfig
7, freetype
8, gdk-pixbuf
9, gettext
10, glib
11, gobject-introspection
12, gperf
13, gtk-doc
14, gtk3
15, json-glib
16, libarchive
17, libsoup
18, libuuid
19, libxslt
20, meson
21, ninja
22, pkg-config
23, pngquant
24}:
25stdenv.mkDerivation rec {
26 pname = "appstream-glib";
27 version = "0.7.18";
28
29 outputs = [ "out" "dev" "man" "installedTests" ];
30 outputBin = "dev";
31
32 src = fetchFromGitHub {
33 owner = "hughsie";
34 repo = "appstream-glib";
35 rev = "${lib.replaceStrings ["-"] ["_"] pname}_${lib.replaceStrings ["."] ["_"] version}";
36 sha256 = "12s7d3nqjs1fldnppbg2mkjg4280f3h8yzj3q1hiz3chh1w0vjbx";
37 };
38
39 nativeBuildInputs = [
40 docbook_xml_dtd_42
41 docbook_xsl
42 gettext
43 gobject-introspection
44 gperf
45 gtk-doc
46 libxslt
47 meson
48 ninja
49 pkg-config
50 ];
51
52 buildInputs = [
53 fontconfig
54 freetype
55 gdk-pixbuf
56 glib
57 gtk3
58 json-glib
59 libarchive
60 libsoup
61 libuuid
62 ];
63
64 propagatedBuildInputs = [
65 glib
66 gdk-pixbuf
67 ];
68
69 patches = [
70 (substituteAll {
71 src = ./paths.patch;
72 pngquant = "${pngquant}/bin/pngquant";
73 })
74 ];
75
76 mesonFlags = [
77 "-Drpm=false"
78 "-Dstemmer=false"
79 "-Ddep11=false"
80 ];
81
82 doCheck = false; # fails at least 1 test
83
84 postInstall = ''
85 moveToOutput "share/installed-tests" "$installedTests"
86 '';
87
88 meta = with lib; {
89 description = "Objects and helper methods to read and write AppStream metadata";
90 homepage = "https://people.freedesktop.org/~hughsient/appstream-glib/";
91 license = licenses.lgpl2Plus;
92 platforms = platforms.unix;
93 maintainers = with maintainers; [ matthewbauer ];
94 };
95}