nixpkgs/pkgs/development/libraries/libgudev/default.nix

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

67 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchurl
, pkg-config
2021-03-21 01:21:42 +00:00
, meson
, ninja
, udev
, glib
, gnome
2021-03-21 01:21:42 +00:00
, vala
, withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform)
, gobject-introspection
}:
stdenv.mkDerivation rec {
2018-03-03 02:56:57 +00:00
pname = "libgudev";
version = "237";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1al6nr492nzbm8ql02xhzwci2kwb1advnkaky3j9636jf08v41hd";
};
strictDeps = true;
depsBuildBuild = [ pkg-config ];
2021-03-21 01:21:42 +00:00
nativeBuildInputs = [
pkg-config
meson
ninja
vala
glib # for glib-mkenums needed during the build
] ++ lib.optionals withIntrospection [
gobject-introspection
2021-03-21 01:21:42 +00:00
];
2021-03-21 01:21:42 +00:00
buildInputs = [
udev
glib
];
mesonFlags = [
# There's a dependency cycle with umockdev and the tests fail to LD_PRELOAD anyway
"-Dtests=disabled"
"-Dintrospection=${if withIntrospection then "enabled" else "disabled"}"
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"-Dvapi=disabled"
2021-03-21 01:21:42 +00:00
];
2018-03-03 02:56:57 +00:00
passthru = {
updateScript = gnome.updateScript {
2018-03-03 02:56:57 +00:00
packageName = pname;
versionPolicy = "none";
};
};
meta = with lib; {
description = "A library that provides GObject bindings for libudev";
homepage = "https://wiki.gnome.org/Projects/libgudev";
maintainers = [ maintainers.eelco ] ++ teams.gnome.members;
2017-04-01 11:26:36 +01:00
platforms = platforms.linux;
license = licenses.lgpl2Plus;
};
}