2021-10-14 00:43:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-11-12 09:05:59 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-11-12 09:05:59 +00:00
|
|
|
, fetchFromGitLab
|
2020-12-07 07:45:13 +00:00
|
|
|
, fetchpatch
|
2020-11-12 09:05:59 +00:00
|
|
|
, python3
|
|
|
|
, umockdev
|
|
|
|
, gobject-introspection
|
|
|
|
, dbus
|
|
|
|
, asciidoc
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
, docbook_xml_dtd_45
|
2022-05-18 14:49:53 +00:00
|
|
|
, docbook-xsl-nons
|
2020-11-12 09:05:59 +00:00
|
|
|
, glib
|
|
|
|
, systemd
|
|
|
|
, polkit
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bolt";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "0.9.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "bolt";
|
|
|
|
repo = "bolt";
|
|
|
|
rev = version;
|
2022-05-18 14:49:53 +00:00
|
|
|
sha256 = "eXjj7oD5HOW/AG2uxDa0tSleKmbouFd2fwlL2HHFiMA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
patches = [
|
|
|
|
# meson install tries to create /var/lib/boltd
|
|
|
|
./0001-skip-mkdir.patch
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
# Test does not work on ZFS with atime disabled.
|
2021-10-14 00:43:12 +00:00
|
|
|
# Upstream issue: https://gitlab.freedesktop.org/bolt/bolt/-/issues/167
|
|
|
|
(fetchpatch {
|
2022-05-18 14:49:53 +00:00
|
|
|
url = "https://gitlab.freedesktop.org/bolt/bolt/-/commit/c2f1d5c40ad71b20507e02faa11037b395fac2f8.diff";
|
|
|
|
revert = true;
|
|
|
|
sha256 = "6w7ll65W/CydrWAVi/qgzhrQeDv1PWWShulLxoglF+I=";
|
2021-10-14 00:43:12 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2020-11-12 09:05:59 +00:00
|
|
|
asciidoc
|
|
|
|
docbook_xml_dtd_45
|
2022-05-18 14:49:53 +00:00
|
|
|
docbook-xsl-nons
|
2020-11-12 09:05:59 +00:00
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2022-09-30 11:47:45 +00:00
|
|
|
glib
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optional (!doCheck) python3;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-11-12 09:05:59 +00:00
|
|
|
polkit
|
|
|
|
systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
# https://gitlab.freedesktop.org/bolt/bolt/-/issues/181
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LD_LIBRARY_PATH=${umockdev.out}/lib/
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-11-12 09:05:59 +00:00
|
|
|
dbus
|
|
|
|
gobject-introspection
|
|
|
|
umockdev
|
2022-09-30 11:47:45 +00:00
|
|
|
(python3.pythonForBuild.withPackages
|
2020-04-24 23:36:52 +00:00
|
|
|
(p: [ p.pygobject3 p.dbus-python p.python-dbusmock ]))
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dlocalstatedir=/var"
|
|
|
|
];
|
|
|
|
|
|
|
|
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
|
|
|
|
PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|