From 9b904a92a25aa86982e7f456c8d2ef6471c48015 Mon Sep 17 00:00:00 2001 From: Bram Duvigneau Date: Wed, 22 Nov 2023 23:27:10 +0100 Subject: [PATCH 1/2] brltty: 6.3 -> 6.6 --- pkgs/tools/misc/brltty/default.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/misc/brltty/default.nix b/pkgs/tools/misc/brltty/default.nix index f9b3ec3f73ac..7b677aff70ac 100644 --- a/pkgs/tools/misc/brltty/default.nix +++ b/pkgs/tools/misc/brltty/default.nix @@ -6,14 +6,14 @@ stdenv.mkDerivation rec { pname = "brltty"; - version = "6.3"; + version = "6.6"; src = fetchurl { url = "https://brltty.app/archive/${pname}-${version}.tar.gz"; - sha256 = "14psxwlvgyi2fj1zh8rfykyjcjaya8xa7yg574bxd8y8n49n8hvb"; + sha256 = "E+j2mb8UTuGx6PkAOt03hQkvf1XvEHxJEuPBT2zMpPw="; }; - nativeBuildInputs = [ pkg-config python3.pkgs.cython tcl ]; + nativeBuildInputs = [ pkg-config python3.pkgs.cython python3.pkgs.setuptools tcl ]; buildInputs = [ bluez ] ++ lib.optional alsaSupport alsa-lib ++ lib.optional systemdSupport systemd; @@ -37,10 +37,12 @@ stdenv.mkDerivation rec { "SYSTEMD_UNITS_DIRECTORY=$(out)/lib/systemd/system" "SYSTEMD_USERS_DIRECTORY=$(out)/lib/sysusers.d" "SYSTEMD_FILES_DIRECTORY=$(out)/lib/tmpfiles.d" - "UDEV_LIBRARY_DIRECTORY=$(out)/lib/udev" + "UDEV_PARENT_LOCATION=$(out)/lib" + "INSTALL_COMMANDS_DIRECTORY=$(out)/libexec/brltty" "UDEV_RULES_TYPE=all" "POLKIT_POLICY_DIR=$(out)/share/polkit-1/actions" "POLKIT_RULE_DIR=$(out)/share/polkit-1/rules.d" + "TCL_DIR=$(out)/lib" ]; configureFlags = [ "--with-writable-directory=/run/brltty" @@ -69,7 +71,6 @@ stdenv.mkDerivation rec { ( cd $out/lib substituteInPlace systemd/system/brltty@.service \ - --replace '/usr/lib' "$out/lib" \ --replace '/sbin/modprobe' '${kmod}/bin/modprobe' # Ensure the systemd-wrapper script uses the correct path to the brltty binary sed "/^Environment=\"BRLTTY_EXECUTABLE_ARGUMENTS.*/a Environment=\"BRLTTY_EXECUTABLE_PATH=$out/bin/brltty\"" -i systemd/system/brltty@.service @@ -77,11 +78,14 @@ stdenv.mkDerivation rec { --replace '/usr/bin/true' '${coreutils}/bin/true' substituteInPlace udev/rules.d/90-brltty-uinput.rules \ --replace '/usr/bin/setfacl' '${acl}/bin/setfacl' - substituteInPlace tmpfiles.d/brltty.conf \ + substituteInPlace udev/rules.d/90-brltty-hid.rules \ + --replace '/usr/bin/setfacl' '${acl}/bin/setfacl' + substituteInPlace tmpfiles.d/brltty.conf \ --replace "$out/etc" '/etc' # Remove unused commands from udev rules - sed '/initctl/d' -i udev/rules.d/90-brltty-device.rules + sed '/initctl/d' -i udev/rules.d/90-brltty-usb-generic.rules + sed '/initctl/d' -i udev/rules.d/90-brltty-usb-customized.rules # Remove pulse-access group from systemd unit and sysusers substituteInPlace systemd/system/brltty@.service \ --replace 'SupplementaryGroups=pulse-access' '# SupplementaryGroups=pulse-access' From c2d1cd852fac14f9d05f86e5abeecaf32f8a78ad Mon Sep 17 00:00:00 2001 From: Bram Duvigneau Date: Tue, 28 Nov 2023 22:43:26 +0100 Subject: [PATCH 2/2] nixos/brltty: Set isSystemUser for the brltty user --- nixos/modules/services/hardware/brltty.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/hardware/brltty.nix b/nixos/modules/services/hardware/brltty.nix index 3133804f485f..f96760e92c57 100644 --- a/nixos/modules/services/hardware/brltty.nix +++ b/nixos/modules/services/hardware/brltty.nix @@ -34,6 +34,7 @@ in { users.users.brltty = { description = "BRLTTY daemon user"; group = "brltty"; + isSystemUser = true; }; users.groups = { brltty = { };