2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, gettext
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk-doc
|
|
|
|
, docbook_xsl
|
|
|
|
, glib
|
2022-10-21 18:38:19 +00:00
|
|
|
, libsoup_3
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
, check
|
|
|
|
, curl
|
|
|
|
, perl
|
|
|
|
, hwdata
|
|
|
|
, osinfo-db
|
|
|
|
, substituteAll
|
|
|
|
, vala ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libosinfo";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "1.10.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.xz";
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-olLgD8WA3rIdoNqMCqA7jDHoRAuESMi5gUP6tHfTIwU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
outputs = [ "out" "dev" ]
|
|
|
|
++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "devdoc";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
vala
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
gtk-doc
|
|
|
|
docbook_xsl
|
|
|
|
perl # for pod2man
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
2022-10-21 18:38:19 +00:00
|
|
|
libsoup_3
|
2020-04-24 23:36:52 +00:00
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
check
|
|
|
|
curl
|
|
|
|
perl
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./osinfo-db-data-dir.patch;
|
|
|
|
osinfo_db_data_dir = "${osinfo-db}/share";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dwith-usb-ids-path=${hwdata}/share/hwdata/usb.ids"
|
|
|
|
"-Dwith-pci-ids-path=${hwdata}/share/hwdata/pci.ids"
|
|
|
|
"-Denable-gtk-doc=true"
|
|
|
|
];
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
preCheck = ''
|
|
|
|
patchShebangs ../osinfo/check-symfile.pl ../osinfo/check-symsorting.pl
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GObject based library API for managing information about operating systems, hypervisors and the (virtual) hardware devices they can support";
|
|
|
|
homepage = "https://libosinfo.org/";
|
2022-03-05 16:20:37 +00:00
|
|
|
changelog = "https://gitlab.com/libosinfo/libosinfo/-/blob/v${version}/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
2022-08-12 12:06:08 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|