2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2019-08-13 17:23:40 +01:00
|
|
|
, fetchurl
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2021-03-21 01:21:42 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2019-08-13 17:23:40 +01:00
|
|
|
, udev
|
|
|
|
, glib
|
2021-05-07 22:18:14 +01:00
|
|
|
, gnome
|
2021-03-21 01:21:42 +00:00
|
|
|
, vala
|
2021-10-23 10:01:00 +01:00
|
|
|
, withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform)
|
|
|
|
, gobject-introspection
|
2019-08-13 17:23:40 +01:00
|
|
|
}:
|
2015-09-08 13:50:50 +01:00
|
|
|
|
2019-08-13 17:23:40 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-03-03 02:56:57 +00:00
|
|
|
pname = "libgudev";
|
2021-09-26 11:30:38 +01:00
|
|
|
version = "237";
|
2015-09-08 13:50:50 +01:00
|
|
|
|
2018-02-22 13:34:45 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2015-09-08 13:50:50 +01:00
|
|
|
src = fetchurl {
|
2021-01-21 17:00:13 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2021-09-26 11:30:38 +01:00
|
|
|
sha256 = "1al6nr492nzbm8ql02xhzwci2kwb1advnkaky3j9636jf08v41hd";
|
2015-09-08 13:50:50 +01:00
|
|
|
};
|
|
|
|
|
2021-10-23 10:01:00 +01:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
depsBuildBuild = [ pkg-config ];
|
|
|
|
|
2021-03-21 01:21:42 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
vala
|
2021-10-23 10:01:00 +01:00
|
|
|
glib # for glib-mkenums needed during the build
|
|
|
|
] ++ lib.optionals withIntrospection [
|
|
|
|
gobject-introspection
|
2021-03-21 01:21:42 +00:00
|
|
|
];
|
2015-09-08 13:50:50 +01: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"
|
2021-10-23 10:01:00 +01:00
|
|
|
"-Dintrospection=${if withIntrospection then "enabled" else "disabled"}"
|
2021-05-21 23:00:00 +01:00
|
|
|
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
|
|
|
"-Dvapi=disabled"
|
2021-03-21 01:21:42 +00:00
|
|
|
];
|
2017-04-01 12:24:10 +01:00
|
|
|
|
2018-03-03 02:56:57 +00:00
|
|
|
passthru = {
|
2021-05-07 22:18:14 +01:00
|
|
|
updateScript = gnome.updateScript {
|
2018-03-03 02:56:57 +00:00
|
|
|
packageName = pname;
|
|
|
|
versionPolicy = "none";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-11-17 08:43:55 +00:00
|
|
|
description = "A library that provides GObject bindings for libudev";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://wiki.gnome.org/Projects/libgudev";
|
2020-04-01 13:40:51 +01:00
|
|
|
maintainers = [ maintainers.eelco ] ++ teams.gnome.members;
|
2017-04-01 11:26:36 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.lgpl2Plus;
|
2015-09-08 13:50:50 +01:00
|
|
|
};
|
|
|
|
}
|