2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, ninja
|
|
|
|
, meson
|
2022-08-12 12:06:08 +00:00
|
|
|
, mesonEmulatorHook
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, vala
|
|
|
|
, gobject-introspection
|
2023-03-15 16:39:30 +00:00
|
|
|
, buildPackages
|
2023-10-19 13:55:26 +00:00
|
|
|
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
|
2020-12-03 08:41:04 +00:00
|
|
|
, gtk-doc
|
|
|
|
, docbook-xsl-nons
|
|
|
|
, docbook_xml_dtd_43
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib
|
|
|
|
, libgudev
|
|
|
|
, libevdev
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libmanette";
|
2020-12-03 08:41:04 +00:00
|
|
|
version = "0.2.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-05 17:12:51 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2020-12-03 08:41:04 +00:00
|
|
|
sha256 = "1b3bcdkk5xd5asq797cch9id8692grsjxrc1ss87vv11m1ck4rb3";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2023-03-15 16:39:30 +00:00
|
|
|
glib
|
|
|
|
] ++ lib.optionals withIntrospection [
|
2020-04-24 23:36:52 +00:00
|
|
|
vala
|
|
|
|
gobject-introspection
|
2020-12-03 08:41:04 +00:00
|
|
|
gtk-doc
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_43
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
2022-08-12 12:06:08 +00:00
|
|
|
mesonEmulatorHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
libevdev
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals withIntrospection [
|
|
|
|
libgudev
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
mesonFlags = [
|
2023-03-15 16:39:30 +00:00
|
|
|
(lib.mesonBool "doc" withIntrospection)
|
|
|
|
(lib.mesonEnable "gudev" withIntrospection)
|
|
|
|
(lib.mesonBool "introspection" withIntrospection)
|
|
|
|
(lib.mesonBool "vapi" withIntrospection)
|
2020-12-03 08:41:04 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
packageName = pname;
|
2021-05-20 23:08:51 +00:00
|
|
|
versionPolicy = "odd-unstable";
|
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 = "A simple GObject game controller library";
|
2020-12-03 08:41:04 +00:00
|
|
|
homepage = "https://gnome.pages.gitlab.gnome.org/libmanette/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|