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";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.xz";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-G/lu7J4UYPPRpxMWPMof8NSAo0kLUImSkvFFSLOpa2A=";
|
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";
|
|
|
|
})
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# Fix build with libxml 2.12
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.com/libosinfo/libosinfo/-/commit/5bbdd06503456784c5ffa22409e8bab50470d673.patch";
|
|
|
|
hash = "sha256-KqgHXI+lD5VYp2wtA58Drp15TgNK1O3xCaYBy4/B9wc=";
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|