nixpkgs/pkgs/by-name/li/libmanette/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchurl
, ninja
, meson
, mesonEmulatorHook
, pkg-config
, vala
, gobject-introspection
, buildPackages
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_43
, glib
, libgudev
, libevdev
, gnome
}:
2018-08-25 23:03:59 +00:00
stdenv.mkDerivation rec {
2018-08-25 23:03:59 +00:00
pname = "libmanette";
version = "0.2.9";
2018-08-25 23:03:59 +00:00
outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
2018-08-25 23:03:59 +00:00
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
hash = "sha256-KTZr5UUvYKdMZfxk/+LXTt3U5uaCTCzvpWekO9kraI8=";
2018-08-25 23:03:59 +00:00
};
nativeBuildInputs = [
meson
ninja
pkg-config
glib
] ++ lib.optionals withIntrospection [
vala
gobject-introspection
gtk-doc
docbook-xsl-nons
docbook_xml_dtd_43
] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
buildInputs = [
glib
libevdev
] ++ lib.optionals withIntrospection [
libgudev
];
2018-08-25 23:03:59 +00:00
mesonFlags = [
(lib.mesonBool "doc" withIntrospection)
(lib.mesonEnable "gudev" withIntrospection)
(lib.mesonBool "introspection" withIntrospection)
(lib.mesonBool "vapi" withIntrospection)
];
2018-08-25 23:03:59 +00:00
doCheck = true;
passthru = {
updateScript = gnome.updateScript {
2018-08-25 23:03:59 +00:00
packageName = pname;
versionPolicy = "odd-unstable";
2018-08-25 23:03:59 +00:00
};
};
meta = with lib; {
2018-08-25 23:03:59 +00:00
description = "Simple GObject game controller library";
mainProgram = "manette-test";
homepage = "https://gnome.pages.gitlab.gnome.org/libmanette/";
2018-08-25 23:03:59 +00:00
license = licenses.lgpl21Plus;
maintainers = teams.gnome.members;
2018-08-25 23:03:59 +00:00
platforms = platforms.unix;
};
}