2019-08-22 23:31:27 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, docbook_xml_dtd_43
|
|
|
|
, docbook_xsl
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk-doc
|
|
|
|
, libuuid
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkgconfig
|
|
|
|
, python3
|
|
|
|
, shared-mime-info
|
2019-08-23 00:34:48 +01:00
|
|
|
, nixosTests
|
2019-08-22 23:31:27 +01:00
|
|
|
}:
|
2018-11-10 14:21:27 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-22 23:31:27 +01:00
|
|
|
pname = "libxmlb";
|
|
|
|
version = "0.1.11";
|
2018-11-10 14:21:27 +00:00
|
|
|
|
2019-08-22 23:31:27 +01:00
|
|
|
outputs = [ "out" "lib" "dev" "devdoc" "installedTests" ];
|
2018-11-10 14:21:27 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hughsie";
|
|
|
|
repo = "libxmlb";
|
|
|
|
rev = version;
|
2019-08-22 23:31:27 +01:00
|
|
|
sha256 = "1503v76w7543snqyjxykiqa5va62zb0ccn3jlw0gpdx8973v80mr";
|
2018-11-10 14:21:27 +00:00
|
|
|
};
|
|
|
|
|
2019-08-22 23:31:27 +01:00
|
|
|
patches = [
|
|
|
|
# Fix installed tests
|
|
|
|
# https://github.com/hughsie/libxmlb/pull/2
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/hughsie/libxmlb/commit/78850c8b0f644f729fa21e2bf9ebed0d9d6010f3.diff";
|
|
|
|
sha256 = "0zw7c6vy8hscln7za7ijqd9svirach3zdskvbzyxxcsm3xcwxpjm";
|
|
|
|
})
|
2018-11-10 14:21:27 +00:00
|
|
|
|
2019-08-22 23:31:27 +01:00
|
|
|
./installed-tests-path.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
docbook_xml_dtd_43
|
|
|
|
docbook_xsl
|
|
|
|
gobject-introspection
|
|
|
|
gtk-doc
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkgconfig
|
|
|
|
(python3.withPackages (pkgs: with pkgs; [ setuptools ]))
|
|
|
|
shared-mime-info
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
libuuid
|
|
|
|
];
|
2018-11-10 14:21:27 +00:00
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"--libexecdir=${placeholder "out"}/libexec"
|
|
|
|
"-Dgtkdoc=true"
|
2019-08-22 23:31:27 +01:00
|
|
|
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
2018-11-10 14:21:27 +00:00
|
|
|
];
|
|
|
|
|
2019-02-16 07:40:40 +00:00
|
|
|
preCheck = ''
|
|
|
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS:${shared-mime-info}/share
|
|
|
|
'';
|
|
|
|
|
2018-11-10 14:21:27 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2019-08-23 00:34:48 +01:00
|
|
|
passthru = {
|
|
|
|
tests = {
|
|
|
|
installed-tests = nixosTests.libxmlb;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-11-10 14:21:27 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A library to help create and query binary XML blobs";
|
|
|
|
homepage = https://github.com/hughsie/libxmlb;
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
2019-05-11 10:30:46 +01:00
|
|
|
platforms = platforms.linux;
|
2018-11-10 14:21:27 +00:00
|
|
|
};
|
|
|
|
}
|