2020-11-12 09:05:59 +00:00
|
|
|
{ stdenv
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkgconfig
|
|
|
|
, fetchFromGitLab
|
|
|
|
, python3
|
|
|
|
, umockdev
|
|
|
|
, gobject-introspection
|
|
|
|
, dbus
|
|
|
|
, asciidoc
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
, docbook_xml_dtd_45
|
|
|
|
, docbook_xsl
|
|
|
|
, glib
|
|
|
|
, systemd
|
|
|
|
, polkit
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bolt";
|
2020-11-12 09:05:59 +00:00
|
|
|
version = "0.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "bolt";
|
|
|
|
repo = "bolt";
|
|
|
|
rev = version;
|
2020-11-12 09:05:59 +00:00
|
|
|
sha256 = "sha256-lcJE+bMK2S2GObHMy/Fu12WGb3T1HrWjsNyZPz4/f4E=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2020-11-12 09:05:59 +00:00
|
|
|
asciidoc
|
|
|
|
docbook_xml_dtd_45
|
|
|
|
docbook_xsl
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkgconfig
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ stdenv.lib.optional (!doCheck) python3;
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-11-12 09:05:59 +00:00
|
|
|
glib
|
|
|
|
polkit
|
|
|
|
systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LD_LIBRARY_PATH=${umockdev.out}/lib/
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
2020-11-12 09:05:59 +00:00
|
|
|
dbus
|
|
|
|
gobject-introspection
|
|
|
|
umockdev
|
2020-04-24 23:36:52 +00:00
|
|
|
(python3.withPackages
|
|
|
|
(p: [ p.pygobject3 p.dbus-python p.python-dbusmock ]))
|
|
|
|
];
|
|
|
|
|
|
|
|
# meson install tries to create /var/lib/boltd
|
|
|
|
patches = [ ./0001-skip-mkdir.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dlocalstatedir=/var"
|
|
|
|
];
|
|
|
|
|
|
|
|
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
|
|
|
|
PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Thunderbolt 3 device management daemon";
|
|
|
|
homepage = "https://gitlab.freedesktop.org/bolt/bolt";
|
|
|
|
license = licenses.lgpl21Plus;
|
2020-11-12 09:05:59 +00:00
|
|
|
maintainers = with maintainers; [ callahad ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|