about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/appstream-glib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/appstream-glib
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/appstream-glib')
-rw-r--r--nixpkgs/pkgs/development/libraries/appstream-glib/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/appstream-glib/paths.patch11
2 files changed, 66 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..9569f51ba792
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/appstream-glib/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchFromGitHub, substituteAll, pkgconfig, gettext, gtk3, glib
+, gtk-doc, libarchive, gobject-introspection, libxslt, pngquant
+, sqlite, libsoup, attr, acl, docbook_xsl, docbook_xml_dtd_42
+, libuuid, json-glib, meson, gperf, ninja
+}:
+stdenv.mkDerivation rec {
+  name = "appstream-glib-0.7.14";
+
+  outputs = [ "out" "dev" "man" "installedTests" ];
+  outputBin = "dev";
+
+  src = fetchFromGitHub {
+    owner = "hughsie";
+    repo = "appstream-glib";
+    rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name;
+    sha256 = "1908ilra1l0m2a224azmj6p4yglzdwwk41rr6rhby959sgw3iaky";
+  };
+
+  nativeBuildInputs = [
+    meson pkgconfig ninja gtk-doc libxslt docbook_xsl docbook_xml_dtd_42
+  ];
+  buildInputs = [
+    glib gettext sqlite libsoup
+    attr acl libuuid json-glib
+    libarchive gobject-introspection gperf
+  ];
+  propagatedBuildInputs = [ gtk3 ];
+
+  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.linux;
+    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))