2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2020-11-09 15:57:02 +01:00
|
|
|
, meson
|
|
|
|
, ninja
|
2021-01-19 07:50:56 +01:00
|
|
|
, pkg-config
|
2020-11-09 15:57:02 +01:00
|
|
|
, fetchFromGitLab
|
2020-12-06 23:56:11 +01:00
|
|
|
, fetchpatch
|
2020-11-09 15:57:02 +01:00
|
|
|
, python3
|
|
|
|
, umockdev
|
|
|
|
, gobject-introspection
|
|
|
|
, dbus
|
|
|
|
, asciidoc
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
, docbook_xml_dtd_45
|
|
|
|
, docbook_xsl
|
|
|
|
, glib
|
|
|
|
, systemd
|
|
|
|
, polkit
|
2019-02-18 22:58:30 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bolt";
|
2020-11-09 15:57:02 +01:00
|
|
|
version = "0.9";
|
2019-02-18 22:58:30 +01:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "bolt";
|
|
|
|
repo = "bolt";
|
2019-09-09 01:38:31 +02:00
|
|
|
rev = version;
|
2020-11-09 15:57:02 +01:00
|
|
|
sha256 = "sha256-lcJE+bMK2S2GObHMy/Fu12WGb3T1HrWjsNyZPz4/f4E=";
|
2019-02-18 22:58:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2020-11-09 15:57:02 +01:00
|
|
|
asciidoc
|
|
|
|
docbook_xml_dtd_45
|
|
|
|
docbook_xsl
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
meson
|
|
|
|
ninja
|
2021-01-19 07:50:56 +01:00
|
|
|
pkg-config
|
2021-01-15 15:45:37 +01:00
|
|
|
] ++ lib.optional (!doCheck) python3;
|
2019-02-18 22:58:30 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-11-09 15:57:02 +01:00
|
|
|
glib
|
|
|
|
polkit
|
|
|
|
systemd
|
2019-02-18 22:58:30 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LD_LIBRARY_PATH=${umockdev.out}/lib/
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
2020-11-09 15:57:02 +01:00
|
|
|
dbus
|
|
|
|
gobject-introspection
|
|
|
|
umockdev
|
2019-02-18 22:58:30 +01:00
|
|
|
(python3.withPackages
|
|
|
|
(p: [ p.pygobject3 p.dbus-python p.python-dbusmock ]))
|
|
|
|
];
|
|
|
|
|
2020-12-06 23:56:11 +01:00
|
|
|
patches = [
|
|
|
|
# meson install tries to create /var/lib/boltd
|
|
|
|
./0001-skip-mkdir.patch
|
|
|
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/104429
|
|
|
|
# Upstream issue: https://gitlab.freedesktop.org/bolt/bolt/-/issues/167
|
|
|
|
(fetchpatch {
|
|
|
|
name = "disable-atime-tests.diff";
|
|
|
|
url = "https://gitlab.freedesktop.org/roberth/bolt/-/commit/1f672a7de2ebc4dd51590bb90f3b873a8ac0f4e6.diff";
|
|
|
|
sha256 = "134f5s6kjqs6612pwq5pm1miy58crn1kxbyyqhzjnzmf9m57fnc8";
|
|
|
|
})
|
|
|
|
];
|
2019-02-18 22:58:30 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
2019-08-18 20:13:42 +02:00
|
|
|
patchShebangs scripts tests
|
2019-02-18 22:58:30 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dlocalstatedir=/var"
|
|
|
|
];
|
|
|
|
|
|
|
|
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
|
|
|
|
PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-02-18 22:58:30 +01:00
|
|
|
description = "Thunderbolt 3 device management daemon";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://gitlab.freedesktop.org/bolt/bolt";
|
2019-02-18 22:58:30 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
2020-11-09 15:57:02 +01:00
|
|
|
maintainers = with maintainers; [ callahad ];
|
2019-02-18 22:58:30 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|