From 538eeedf7ee64f98b17507ea11d38512525ef29f Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Sun, 18 Jul 2021 12:11:55 +0200 Subject: [PATCH v4 1/2] gnu: Add bolt. * gnu/packages/linux.scm (bolt): New variable. diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index d7d373a92f..c1f4c99cbf 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -136,6 +136,7 @@ (define-module (gnu packages linux) #:use-module (gnu packages perl) #:use-module (gnu packages pciutils) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages polkit) #:use-module (gnu packages popt) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) @@ -2702,6 +2703,56 @@ (define-public iptables Both commands are targeted at system administrators.") (license license:gpl2+))) +(define-public bolt + (package + (name "bolt") + (version "0.9.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/bolt/bolt") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1h48qmqxhjq9gxv5gf78cqm5wadmnhvc9bkd02zya77rh3pf6y3r")))) + (build-system meson-build-system) + (arguments + (list #:configure-flags '(list "--localstatedir=/var") + #:glib-or-gtk? #t ;To wrap binaries and/or compile schemas + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'replace-directories + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "meson.build" + (("udev.get_pkgconfig_variable..udevdir..") + (string-append "'" + #$output "/lib/udev'"))) + (substitute* "scripts/meson-install.sh" + (("mkdir.*") + "")))) + (add-before 'install 'no-polkit-magic + (lambda* (#:key outputs #:allow-other-keys) + (setenv "PKEXEC_UID" "something")))))) + (native-inputs (list pkg-config + `(,glib "bin") python asciidoc umockdev)) + (inputs (list eudev dbus polkit)) + (synopsis "Thunderbolt 3 device manager") + (description + "This package provides @command{boltd}, a userspace daemon +for Thunderbolt devices, and @command{boltctl}, a command-line utility for +managing those devices. + +The daemon @command{boltd} exposes devices via D-Bus to clients. It also +stores a database of previously authorized devices and will, depending on the +policy set for the individual devices, automatically authorize newly connected +devices without user interaction. + +The command-line utility @command{boltctl} manages Thunderbolt devices via +@command{boltd}. It can list devices, monitor changes, and initiate +authorization of devices.") + (home-page "https://gitlab.freedesktop.org/bolt/bolt") + (license license:gpl2+))) + (define-public jitterentropy-rngd (package (name "jitterentropy-rngd") -- 2.37.0