Added BRLTTY package
This commit is contained in:
parent
06cf9a9613
commit
9a535b9023
@ -152,6 +152,7 @@
|
|||||||
./services/hardware/actkbd.nix
|
./services/hardware/actkbd.nix
|
||||||
./services/hardware/amd-hybrid-graphics.nix
|
./services/hardware/amd-hybrid-graphics.nix
|
||||||
./services/hardware/bluetooth.nix
|
./services/hardware/bluetooth.nix
|
||||||
|
./services/hardware/brltty.nix
|
||||||
./services/hardware/freefall.nix
|
./services/hardware/freefall.nix
|
||||||
./services/hardware/nvidia-optimus.nix
|
./services/hardware/nvidia-optimus.nix
|
||||||
./services/hardware/pcscd.nix
|
./services/hardware/pcscd.nix
|
||||||
|
42
nixos/modules/services/hardware/brltty.nix
Normal file
42
nixos/modules/services/hardware/brltty.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.brltty;
|
||||||
|
|
||||||
|
stateDir = "/run/brltty";
|
||||||
|
|
||||||
|
pidFile = "${stateDir}/brltty.pid";
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
services.brltty.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable the BRLTTY daemon.";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
systemd.services.brltty = {
|
||||||
|
description = "Braille console driver";
|
||||||
|
preStart = ''
|
||||||
|
mkdir -p ${stateDir}
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.brltty}/bin/brltty --pid-file=${pidFile}";
|
||||||
|
Type = "forking";
|
||||||
|
PIDFile = pidFile;
|
||||||
|
};
|
||||||
|
before = [ "sysinit.target" ];
|
||||||
|
wantedBy = [ "sysinit.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
33
pkgs/tools/misc/brltty/default.nix
Normal file
33
pkgs/tools/misc/brltty/default.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{ stdenv, fetchurl, pkgconfig, alsaSupport, alsaLib ? null, bluez }:
|
||||||
|
|
||||||
|
assert alsaSupport -> alsaLib != null;
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "brltty-5.2";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://brltty.com/archive/${name}.tar.gz";
|
||||||
|
sha256 = "1zaab5pxkqrv081n23p3am445d30gk0km4azqdirvcpw9z15q0cz";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ pkgconfig alsaLib bluez ]
|
||||||
|
++ stdenv.lib.optional alsaSupport alsaLib;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Access software for a blind person using a braille display";
|
||||||
|
longDescription = ''
|
||||||
|
BRLTTY is a background process (daemon) which provides access to the Linux/Unix
|
||||||
|
console (when in text mode) for a blind person using a refreshable braille display.
|
||||||
|
It drives the braille display, and provides complete screen review functionality.
|
||||||
|
Some speech capability has also been incorporated.
|
||||||
|
'';
|
||||||
|
homepage = http://www.brltty.com/;
|
||||||
|
license = stdenv.lib.licenses.gpl2;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.bramd ];
|
||||||
|
platforms = stdenv.lib.platforms.all;
|
||||||
|
};
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
substituteInPlace configure --replace /sbin/ldconfig ldconfig
|
||||||
|
'';
|
||||||
|
}
|
@ -715,6 +715,9 @@ let
|
|||||||
|
|
||||||
brasero = callPackage ../tools/cd-dvd/brasero { };
|
brasero = callPackage ../tools/cd-dvd/brasero { };
|
||||||
|
|
||||||
|
brltty = callPackage ../tools/misc/brltty {
|
||||||
|
alsaSupport = (!stdenv.isDarwin);
|
||||||
|
};
|
||||||
bro = callPackage ../applications/networking/ids/bro { };
|
bro = callPackage ../applications/networking/ids/bro { };
|
||||||
|
|
||||||
bsod = callPackage ../misc/emulators/bsod { };
|
bsod = callPackage ../misc/emulators/bsod { };
|
||||||
|
Loading…
Reference in New Issue
Block a user