diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/appstream-glib')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/appstream-glib/default.nix | 94 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/appstream-glib/paths.patch | 11 |
2 files changed, 105 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/appstream-glib/default.nix b/nixpkgs/pkgs/development/libraries/appstream-glib/default.nix new file mode 100644 index 000000000000..4b803554e662 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/appstream-glib/default.nix @@ -0,0 +1,94 @@ +{ stdenv +, fetchFromGitHub +, substituteAll +, docbook_xml_dtd_42 +, docbook_xsl +, fontconfig +, freetype +, gdk-pixbuf +, gettext +, glib +, gobject-introspection +, gperf +, gtk-doc +, gtk3 +, json-glib +, libarchive +, libsoup +, libuuid +, libxslt +, meson +, ninja +, pkgconfig +, pngquant +}: +stdenv.mkDerivation rec { + name = "appstream-glib-0.7.16"; + + outputs = [ "out" "dev" "man" "installedTests" ]; + outputBin = "dev"; + + src = fetchFromGitHub { + owner = "hughsie"; + repo = "appstream-glib"; + rev = stdenv.lib.replaceStrings [ "." "-" ] [ "_" "_" ] name; + sha256 = "05x2pmsq18fcpgfvx0y54qdlryy5c9k3sxk6kgank8frkzhgnm9r"; + }; + + nativeBuildInputs = [ + docbook_xml_dtd_42 + docbook_xsl + gettext + gobject-introspection + gperf + gtk-doc + libxslt + meson + ninja + pkgconfig + ]; + + buildInputs = [ + fontconfig + freetype + gdk-pixbuf + glib + gtk3 + json-glib + libarchive + libsoup + libuuid + ]; + + propagatedBuildInputs = [ + glib + gdk-pixbuf + ]; + + patches = [ + (substituteAll { + src = ./paths.patch; + pngquant = "${pngquant}/bin/pngquant"; + }) + ]; + + mesonFlags = [ + "-Drpm=false" + "-Dstemmer=false" + "-Ddep11=false" + ]; + + doCheck = false; # fails at least 1 test + + postInstall = '' + moveToOutput "share/installed-tests" "$installedTests" + ''; + + meta = with stdenv.lib; { + description = "Objects and helper methods to read and write AppStream metadata"; + homepage = https://people.freedesktop.org/~hughsient/appstream-glib/; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ lethalman matthewbauer ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/appstream-glib/paths.patch b/nixpkgs/pkgs/development/libraries/appstream-glib/paths.patch new file mode 100644 index 000000000000..5c6396988a17 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/appstream-glib/paths.patch @@ -0,0 +1,11 @@ +--- a/libappstream-builder/asb-utils.c ++++ b/libappstream-builder/asb-utils.c +@@ -294,7 +294,7 @@ + { + g_autofree gchar *standard_error = NULL; + gint exit_status = 0; +- const gchar *argv[] = { "/usr/bin/pngquant", "--skip-if-larger", ++ const gchar *argv[] = { "@pngquant@", "--skip-if-larger", + "--strip", "--ext", ".png", + "--force", "--speed", "1", filename, NULL }; + if (!g_file_test (argv[0], G_FILE_TEST_IS_EXECUTABLE)) |