2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2019-11-02 13:30:56 +00:00
|
|
|
, fetchurl
|
|
|
|
, ninja
|
|
|
|
, meson
|
2022-07-07 18:34:37 +00:00
|
|
|
, mesonEmulatorHook
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-11-02 13:30:56 +00:00
|
|
|
, vala
|
|
|
|
, gobject-introspection
|
2023-03-01 16:45:08 +00:00
|
|
|
, buildPackages
|
2023-10-12 13:13:57 +00:00
|
|
|
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
|
2020-12-02 15:52:26 +00:00
|
|
|
, gtk-doc
|
|
|
|
, docbook-xsl-nons
|
|
|
|
, docbook_xml_dtd_43
|
2019-11-02 13:30:56 +00:00
|
|
|
, glib
|
|
|
|
, libgudev
|
|
|
|
, libevdev
|
2021-05-07 21:18:14 +00:00
|
|
|
, gnome
|
2019-11-02 13:30:56 +00:00
|
|
|
}:
|
2018-08-25 23:03:59 +00:00
|
|
|
|
2019-11-02 13:30:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-08-25 23:03:59 +00:00
|
|
|
pname = "libmanette";
|
2024-09-14 08:28:36 +00:00
|
|
|
version = "0.2.9";
|
2018-08-25 23:03:59 +00:00
|
|
|
|
2023-03-01 16:45:08 +00:00
|
|
|
outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
|
2018-08-25 23:03:59 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-01-21 17:00:13 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2024-09-14 08:28:36 +00:00
|
|
|
hash = "sha256-KTZr5UUvYKdMZfxk/+LXTt3U5uaCTCzvpWekO9kraI8=";
|
2018-08-25 23:03:59 +00:00
|
|
|
};
|
|
|
|
|
2019-11-02 13:30:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2023-03-01 16:45:08 +00:00
|
|
|
glib
|
|
|
|
] ++ lib.optionals withIntrospection [
|
2019-11-02 13:30:56 +00:00
|
|
|
vala
|
|
|
|
gobject-introspection
|
2020-12-02 15:52:26 +00:00
|
|
|
gtk-doc
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_43
|
2023-03-01 16:45:08 +00:00
|
|
|
] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
2022-07-07 18:34:37 +00:00
|
|
|
mesonEmulatorHook
|
2019-11-02 13:30:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
libevdev
|
2023-03-01 16:45:08 +00:00
|
|
|
] ++ lib.optionals withIntrospection [
|
|
|
|
libgudev
|
2019-11-02 13:30:56 +00:00
|
|
|
];
|
2018-08-25 23:03:59 +00:00
|
|
|
|
2020-12-02 15:52:26 +00:00
|
|
|
mesonFlags = [
|
2023-03-01 16:45:08 +00:00
|
|
|
(lib.mesonBool "doc" withIntrospection)
|
|
|
|
(lib.mesonEnable "gudev" withIntrospection)
|
|
|
|
(lib.mesonBool "introspection" withIntrospection)
|
|
|
|
(lib.mesonBool "vapi" withIntrospection)
|
2020-12-02 15:52:26 +00:00
|
|
|
];
|
|
|
|
|
2018-08-25 23:03:59 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
passthru = {
|
2021-05-07 21:18:14 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2018-08-25 23:03:59 +00:00
|
|
|
packageName = pname;
|
2021-03-20 23:57:24 +00:00
|
|
|
versionPolicy = "odd-unstable";
|
2018-08-25 23:03:59 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2018-08-25 23:03:59 +00:00
|
|
|
description = "Simple GObject game controller library";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "manette-test";
|
2020-12-02 15:52:26 +00:00
|
|
|
homepage = "https://gnome.pages.gitlab.gnome.org/libmanette/";
|
2018-08-25 23:03:59 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2020-04-01 12:40:51 +00:00
|
|
|
maintainers = teams.gnome.members;
|
2018-08-25 23:03:59 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|