2021-10-02 01:40:17 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-11-09 14:57:02 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-11-09 14:57:02 +00:00
|
|
|
, fetchFromGitLab
|
2020-12-06 22:56:11 +00:00
|
|
|
, fetchpatch
|
2020-11-09 14:57:02 +00:00
|
|
|
, python3
|
|
|
|
, umockdev
|
|
|
|
, gobject-introspection
|
|
|
|
, dbus
|
|
|
|
, asciidoc
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
, docbook_xml_dtd_45
|
2022-04-30 22:12:27 +00:00
|
|
|
, docbook-xsl-nons
|
2020-11-09 14:57:02 +00:00
|
|
|
, glib
|
|
|
|
, systemd
|
|
|
|
, polkit
|
2019-02-18 21:58:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bolt";
|
2022-04-30 22:12:27 +00:00
|
|
|
version = "0.9.2";
|
2019-02-18 21:58:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "bolt";
|
|
|
|
repo = "bolt";
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2022-04-30 22:12:27 +00:00
|
|
|
sha256 = "eXjj7oD5HOW/AG2uxDa0tSleKmbouFd2fwlL2HHFiMA=";
|
2019-02-18 21:58:30 +00:00
|
|
|
};
|
|
|
|
|
2021-10-02 01:40:17 +00:00
|
|
|
patches = [
|
|
|
|
# meson install tries to create /var/lib/boltd
|
|
|
|
./0001-skip-mkdir.patch
|
|
|
|
|
2022-04-30 22:12:27 +00:00
|
|
|
# Test does not work on ZFS with atime disabled.
|
2021-10-02 01:40:17 +00:00
|
|
|
# Upstream issue: https://gitlab.freedesktop.org/bolt/bolt/-/issues/167
|
|
|
|
(fetchpatch {
|
2022-04-30 22:12:27 +00:00
|
|
|
url = "https://gitlab.freedesktop.org/bolt/bolt/-/commit/c2f1d5c40ad71b20507e02faa11037b395fac2f8.diff";
|
|
|
|
revert = true;
|
|
|
|
sha256 = "6w7ll65W/CydrWAVi/qgzhrQeDv1PWWShulLxoglF+I=";
|
2021-10-02 01:40:17 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-02-18 21:58:30 +00:00
|
|
|
nativeBuildInputs = [
|
2020-11-09 14:57:02 +00:00
|
|
|
asciidoc
|
|
|
|
docbook_xml_dtd_45
|
2022-04-30 22:12:27 +00:00
|
|
|
docbook-xsl-nons
|
2020-11-09 14:57:02 +00:00
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
meson
|
|
|
|
ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2021-01-15 14:45:37 +00:00
|
|
|
] ++ lib.optional (!doCheck) python3;
|
2019-02-18 21:58:30 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-11-09 14:57:02 +00:00
|
|
|
glib
|
|
|
|
polkit
|
|
|
|
systemd
|
2019-02-18 21:58:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LD_LIBRARY_PATH=${umockdev.out}/lib/
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
2020-11-09 14:57:02 +00:00
|
|
|
dbus
|
|
|
|
gobject-introspection
|
|
|
|
umockdev
|
2019-02-18 21:58:30 +00:00
|
|
|
(python3.withPackages
|
|
|
|
(p: [ p.pygobject3 p.dbus-python p.python-dbusmock ]))
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-08-18 18:13:42 +00:00
|
|
|
patchShebangs scripts tests
|
2019-02-18 21:58:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dlocalstatedir=/var"
|
|
|
|
];
|
|
|
|
|
|
|
|
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
|
|
|
|
PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-02-18 21:58:30 +00:00
|
|
|
description = "Thunderbolt 3 device management daemon";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://gitlab.freedesktop.org/bolt/bolt";
|
2019-02-18 21:58:30 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2020-11-09 14:57:02 +00:00
|
|
|
maintainers = with maintainers; [ callahad ];
|
2019-02-18 21:58:30 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|