mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 01:33:10 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
78 lines
1.7 KiB
Nix
78 lines
1.7 KiB
Nix
{ 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
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libmanette";
|
|
version = "0.2.9";
|
|
|
|
outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
hash = "sha256-KTZr5UUvYKdMZfxk/+LXTt3U5uaCTCzvpWekO9kraI8=";
|
|
};
|
|
|
|
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
|
|
];
|
|
|
|
mesonFlags = [
|
|
(lib.mesonBool "doc" withIntrospection)
|
|
(lib.mesonEnable "gudev" withIntrospection)
|
|
(lib.mesonBool "introspection" withIntrospection)
|
|
(lib.mesonBool "vapi" withIntrospection)
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
passthru = {
|
|
updateScript = gnome.updateScript {
|
|
packageName = pname;
|
|
versionPolicy = "odd-unstable";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Simple GObject game controller library";
|
|
mainProgram = "manette-test";
|
|
homepage = "https://gnome.pages.gitlab.gnome.org/libmanette/";
|
|
license = licenses.lgpl21Plus;
|
|
maintainers = teams.gnome.members;
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|